Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build WiX 3.11 project with references in Visual Studio 2017 #5606

Closed
jhumphries83 opened this issue Jun 5, 2017 · 8 comments
Closed
Labels

Comments

@jhumphries83
Copy link

jhumphries83 commented Jun 5, 2017

Which version of WiX are you building with?
3.11.1701.0

Which version of Visual Studio are you building with (if any)?
Visual Studio 2017 (15.2)

Which version of .NET are you building with?
.NET 4.5

If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?
Windows 10 (Anniversary Update)

When adding a reference to a project within my solution I get the following build error:

Error		The "AssignTargetPath" task failed unexpectedly.
System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
   at Microsoft.Build.Utilities.TaskItem..ctor(ITaskItem sourceItem)
   at Microsoft.Build.Tasks.AssignTargetPath.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	AcceptanceTestConfigurationService.Installer	C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets	2991	

The output window shows this information:

2>C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(845,5): error MSB4018: The "AssignProjectConfiguration" task failed unexpectedly.
2>System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
2>   at Microsoft.Build.Utilities.TaskLoggingHelper.LogMessage(MessageImportance importance, String message, Object[] messageArgs)
2>   at Microsoft.Build.Utilities.TaskLoggingHelper.LogMessageFromResources(MessageImportance importance, String messageResourceName, Object[] messageArgs)
2>   at Microsoft.Build.Tasks.AssignProjectConfiguration.Execute()
2>   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>Done building project "AcceptanceTestConfigurationService.Installer.wixproj" -- FAILED.

When I build the same project with Visual Studio 2015 it builds successfully.

@barnson
Copy link
Member

barnson commented Jun 6, 2017

One thing to try is to create a new .wixproj with the templates from the VS2017 WiX extension, as they have to accommodate the changes in MSBuild v15.

@jhumphries83
Copy link
Author

i did try that - however I get the same issue. The project builds fine up until the point that I add a reference to a project within my solution.

@barnson
Copy link
Member

barnson commented Jun 20, 2017

We haven't received any other reports on this error code. Nobody has any suggestions on what could cause this but it seems something specific to your environment.

@hahalj
Copy link

hahalj commented Jun 29, 2017

I get exactly the same issue. Still haven't found any solution.

@jhumphries83 jhumphries83 changed the title Unable to build WiX 3.6 project with references in Visual Studio 2017 Unable to build WiX 3.11 project with references in Visual Studio 2017 Jul 3, 2017
@hahalj
Copy link

hahalj commented Jul 31, 2017

Just tried to get this solved again. This is what I did:

  1. Opened and rebuilt my original project - still same failure.
  2. Opened another instance of VS2017 and created a new empty WiX-project, built it without anything else added - Success
  3. Switched back to my own failing project and rebuilt it again - Success.

I've no clue to why it now works.

@srosam
Copy link

srosam commented Nov 27, 2017

I also get this issue.
I'm using Visual Studio 2017 with the latest Wix toolset
I trued the above (posted by @hahalj with no success)

@djonasdev
Copy link

1+

@rseanhall
Copy link
Contributor

@robmen robmen added the triage label Mar 17, 2022
@barnson barnson added external and removed triage labels Apr 14, 2022
@barnson barnson closed this as completed Apr 14, 2022
@robmen robmen removed the confined label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants