سؤال

warning MSB8012

I've read through many answers to people asking about this error, but none of them seem to have gotten such a problem as mine. I'm trying to use property sheets in my projects to save having to set up property settings every time, and in turn I'm getting this on build:

2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(989,5): warning MSB8012: TargetPath(C:\MyProj\Release\MyProj.dll) does not match the Linker's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetName(MyProj) does not match the Linker's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).

It'd be easy if all I had to do was change the Linker's OutputFile property value, but as you can see, it says Linker's OutputFile property value () (OutputFile value is null?) each time, which is kinda different the $(OutDir)$(TargetName)$(TargetExt) I set it to be...

The only things I've configured in the property sheet are some debugging settings, some optimisation settings, adding a post-build event and disabling unicode. That's all I need, but this problem is now stuck in the project, even if I remove the property sheet. I've not converted the project from a previous version of Visual Studio at all, like so many who get this warning have, but just tried to add and configure a property sheet.

Here are some of the related settings:

General->Output Directory: $(SolutionDir)$(Configuration)\

General->Target Name: $(ProjectName)

General->Target Extension: .dll

Linker->Output File: $(OutDir)$(TargetName)$(TargetExt)

At first I was just going to ignore this warning, but it actually started causing problems, so I'll be really grateful if someone can figure out this MS puzzle.

هل كانت مفيدة؟

المحلول

It seemed to start having an effect on all projects, so I reinstalled Visual Studio and the problem is gone... I'm scared to try and use property sheets again now, but it's better than nothing. I guess it was all MS' fault.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top