Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unwanted dependency on .NET in deployment project following upgrade to .NET 4.5

After upgrading my machine from .NET 4.0 to 4.5 I find my VS2010 projects now show a dependency on the .NET framework. If I go ahead and build the deployment project, the install requires .NET; I can't find any way to override the automatic dependency on .NET so the install will work without it.

Neither of my projects actually use .NET. Project settings are 'No Common Language Runtime Support', and the projects are both written in native C++, one a console app, the other MFC.

If I roll back to .NET 4.0 the problem goes away & I can deploy to XP environment with no .NET at all just fine. Upgrade to 4.5 and the problem returns.

The options to exclude dependencies does not apply to the .NET framework. Ahhhhhhh.

I'm on the verge of giving up & going to install shield, but reluctant as it all worked before I installed .NET 4.5 (which I need for another app).

Has anyone else seen this ?

like image 464
Aidan Avatar asked Jun 04 '13 11:06

Aidan


1 Answers

Looks like a bug described in KB2735477 VS 2010 setup projects depend on .NET after installing .NET 4.5. Suggested walkaround is to add

 <PropertyGroup>
  <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
 </PropertyGroup>

to the project file then remove .net from the launch condition view.

like image 105
Sheng Jiang 蒋晟 Avatar answered Oct 19 '22 07:10

Sheng Jiang 蒋晟