Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

VS2017 Custom.After.Microsoft.Common.targets was not found
osoykan
#1 Posted : Wednesday, March 15, 2017 1:31:19 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/15/2017(UTC)
Posts: 4
Location: Turkey

Thanks: 2 times
After v3.6 upgrade, I've encountered this error on my project:

VS2017 new solution format.

Quote:
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


NCrunch can't initialize and build.


Thanks.
Remco
#2 Posted : Wednesday, March 15, 2017 9:09:44 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this problem.

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?)
osoykan
#3 Posted : Wednesday, March 15, 2017 9:18:38 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/15/2017(UTC)
Posts: 4
Location: Turkey

Thanks: 2 times
Remco;9973 wrote:
Hi, thanks for sharing this problem.

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.

https://github.com/osoyk...tofac.Extras.IocManager
https://github.com/osoykan/Stove

Remco
#4 Posted : Thursday, March 16, 2017 12:52:18 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Try 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?
2 users thanked Remco for this useful post.
osoykan on 3/16/2017(UTC), alastairs on 4/12/2017(UTC)
osoykan
#5 Posted : Thursday, March 16, 2017 6:43:14 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/15/2017(UTC)
Posts: 4
Location: Turkey

Thanks: 2 times
Remco;9975 wrote:
Try 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?
Remco
#6 Posted : Thursday, March 16, 2017 11:13:21 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
osoykan;9976 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.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.047 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download