3F / DllExport

.NET DllExport with .NET Core support (aka 3F/DllExport aka DllExport.bat)
MIT License
960 stars 133 forks source link

Failing to Build in VS 2019 #191

Closed Waffle1434 closed 3 years ago

Waffle1434 commented 3 years ago

Attempting to build in VS 2019 using .NET Framework 2.6.1 / 2.7.1 / .NET Core 3 fails every time:

Severity    Code    Description Project File    Line    Suppression State
Error       The "DllExportAppDomainIsolatedTask" task failed unexpectedly.
System.ArgumentException: Requested value 'Version46' was not found.

Server stack trace: 
   at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.<>c__DisplayClass8.<GetGetToolPathInternal>b__7(Version version, String toolName) in c:\Users\rober_000\Documents\Code\unmanaged-exports\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:line 568
   at RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.TryToGetToolDirForFxVersion(String toolFileName, Func`3 getToolPath, String& toolDirectory) in c:\Users\rober_000\Documents\Code\unmanaged-exports\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:line 725
   at RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.ValidateToolPath(String toolFileName, String currentValue, Func`3 getToolPath, String& foundPath) in c:\Users\rober_000\Documents\Code\unmanaged-exports\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:line 698
   at RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.ValidateFrameworkPath() in c:\Users\rober_000\Documents\Code\unmanaged-exports\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:line 680
   at RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.ValidateInputValues() in c:\Users\rober_000\Documents\Code\unmanaged-exports\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:line 396
   at RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.Execute() in c:\Users\rober_000\Documents\Code\unmanaged-exports\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:line 264
   at RGiesecke.DllExport.MSBuild.DllExportAppDomainIsolatedTask.Execute() in c:\Users\rober_000\Documents\Code\unmanaged-exports\RGiesecke.DllExport.MSBuild\DllExportAppDomainIsolatedTask.cs:line 241
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Build.Framework.ITask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() ForgeLib2           
Waffle1434 commented 3 years ago

Fixed by installing Microsoft Build Tools 2015 https://www.microsoft.com/en-us/download/details.aspx?id=48159

3F commented 3 years ago

Actually the error should be fixed after #29 And my temp solutions are no longer relevant!

If someone still faced an error

Requested value 'Version46' was not found.

Modern 1.7.4 and VS2019 must work without install Build Tools 2015. Otherwise let's try to fix it together. I need logs. Thanks