After v3.6 upgrade, I've encountered this error on my project:
VS2017 new solution format.
ncrunch.build.targets (4, 3): The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\v15.0\Custom.After.Microsoft.Common.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
WARNING - ..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (1964, 5): MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Autofac" culture="neutral" publicKeyToken="17863af14b0044da" /><bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" /></dependentAssembly></assemblyBinding>
WARNING - Log\NullLogger.cs (9, 46): CS0067: The event 'NullLogger.LoggerReconfigured' is never used
Can you confirm that you're using the latest version of VS2017?
Do you experience this for all projects on your system? Or just a specific solution? (i.e. if you create a dummy project out of one of the default VS templates and try to build it, does this work?)
Can you confirm that you're using the latest version of VS2017?
Do you experience this for all projects on your system? Or just a specific solution? (i.e. if you create a dummy project out of one of the default VS templates and try to build it, does this work?)
Yes Latest version of VS2017 just updated today. 15.03.2017
Not in old csproj formats.
netstandard format with .NET 4.6.1 framework, for example my opensource projects that couldn't built and tested by nCrunch:
they have worked with v3.5 on VS2017, after upgrade 3.6 they didn't work.
1. Browse to the following directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\v15.0\
2. Create a file in this directory with the name: Custom.After.Microsoft.Common.targets
3. Inside this file, add the following:
1. Browse to the following directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\v15.0\
2. Create a file in this directory with the name: Custom.After.Microsoft.Common.targets
3. Inside this file, add the following:
<Project xmlns="(- BROKEN LINK -)">
</Project>
4. Save to disk, then try again.
Does this resolve the problem?
Great! it works. But i was wondering, is this problem related with my configuration or ncrunch. Because there is no v15.0 folder, i created it. Actually there is "15.0" folder, so Did we change the VS 2017's behaviour?
osoykan wrote:
Great! it works. But i was wondering, is this problem related with my configuration or ncrunch. Because there is no v15.0 folder, i created it. Actually there is "15.0" folder, so Did we change the VS 2017's behaviour?
For some reason, there is a property in your build system being set to include a .targets file that doesn't actually exist.
It isn't clear to me why this is the case. Likely its something that made it past MS testing because it was completely benign and didn't cause any problems. The <Import> statement in the MS code normally used to include the file has a check to ensure the file exists, and NCrunch does not have this check, which is why it's exploding.
I'm glad this workaround gets things going for you. I should be able to introduce a proper fix in NCrunch to ensure the file exists before trying to import it. I wouldn't worry about investigating this unless you're experiencing other build issues with VS.