question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InvalidProjectFileException during NativeVersionInfo_CreateNativeResourceDll test

See original GitHub issue

When running the test on the master branch in Visual Studio 2017 15.9.6, I get the following error:

Test FullName:	BuildIntegrationTests.NativeVersionInfo_CreateNativeResourceDll
Test Source:	D:\GitHub\Nerdbank.GitVersioning\src\NerdBank.GitVersioning.Tests\BuildIntegrationTests.cs : line 866
Test Outcome:	Failed
Test Duration:	0:00:00,011

Result StackTrace:	
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   at Microsoft.Build.Execution.ProjectInstance.Initialize(ProjectRootElement xml, IDictionary2 globalProperties, String explicitToolsVersion, String explicitSubToolsetVersion, Int32 visualStudioVersionFromSolution, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext buildEventContext)
   at Microsoft.Build.Execution.ProjectInstance..ctor(ProjectRootElement xml, IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection)
   at Microsoft.Build.Execution.ProjectInstance..ctor(ProjectRootElement xml, IDictionary2 globalProperties, String toolsVersion, ProjectCollection projectCollection)
   at MSBuildExtensions.<BuildAsync>d__0.MoveNext() in D:\GitHub\Nerdbank.GitVersioning\src\NerdBank.GitVersioning.Tests\MSBuildExtensions.cs:line 23
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
   at BuildIntegrationTests.<BuildAsync>d__60.MoveNext() in D:\GitHub\Nerdbank.GitVersioning\src\NerdBank.GitVersioning.Tests\BuildIntegrationTests.cs:line 1009
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
   at BuildIntegrationTests.<NativeVersionInfo_CreateNativeResourceDll>d__55.MoveNext() in D:\GitHub\Nerdbank.GitVersioning\src\NerdBank.GitVersioning.Tests\BuildIntegrationTests.cs:line 870
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Result Message:	Microsoft.Build.Exceptions.InvalidProjectFileException : The tools version "14.0" is unrecognized. Available tools versions are "2.0", "3.5", "4.0".  C:\Users\japj\AppData\Local\Temp\2qfp0css.r3o\projdir\test.vcxproj
Result StandardOutput:	Random seed: 2105343586```

I have installed:
Visual Studio Enterprise 2017 15.9.6 (which I used to run the test) and
Visual Studio Enterprise 2019 16.0.0 Preview 2.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
japjcommented, Feb 2, 2019

Just to help me understand, from this project point of view, it doesn’t really matter which Windows SDK is used right? It just needs any Windows SDK in order for it to work as it is only interested in being able to verify that the build integration generates the correct build versioning output files. It is not using the actual exe/dll output from the C++ project as part of the unit test.

0reactions
AArnottcommented, Feb 2, 2019

Thanks for your tips, @heaths.

That looks great to me, @japj. Can you combine that with re-enabling the test in Azure Pipelines (by removing the attribute) and your other package ref updates that are required, and send a PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.Build.Exceptions.InvalidProjectFileException: The ...
Native.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at OmniSharp.MSBuild.Discovery.Interop.
Read more >
React Native Android build failure with different errors ...
The biggest question I needed answer following the error was: After specifying my react-native version in package.json, why does my project ...
Read more >
Msbuild cannot find references. framwork. Check both of these a
I cannot manually create the Interop dll and check-in into TFS A is a ... Both must be compiled in x86, because A...
Read more >
How to check React Native version
Using info option. Utilizing the CLI. Checking package.json file. React Native version information is usually stored in the package.
Read more >
Visual Studio App Center | iOS, Android, Xamarin & React ...
Continuously build, test, release and monitor apps for every platform. ... React Native logo ... App Center tracks your builds through every release....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found