While my project was building fine, this left me wondering why I had a mix of Content and None item type elements in my ItemGroup. This MSDN article (for Visual Studio 2010) gave me the guidance I was looking for:
Note that when the resource editor adds an image, it sets Build
Action to None, because the .resx file references the image
file. At build time, the image is pulled into the .resources file
created out of the .resx file. The image can then easily be accessed
by way of the strongly-typed class auto-generated for the .resx file.
Therefore, you should not change this setting to Embedded
Resource, because doing this would include the image two times in
the assembly.
Resolution: With this guidance, using a text editor, I changed the Content item type elements to None.
Also, for an overview of MSBuild items, see this MSDN article.
In my situation, my MSBuild file had an
ItemGroup
for image resources that appeared as follows:While my project was building fine, this left me wondering why I had a mix of
Content
andNone
item type elements in myItemGroup
. This MSDN article (for Visual Studio 2010) gave me the guidance I was looking for:Resolution: With this guidance, using a text editor, I changed the
Content
item type elements toNone
.Also, for an overview of MSBuild items, see this MSDN article.
I have a project that contains no compilable items (it stores html and javascript for jasmine unit tests).
One day my solution (that contained said project) stopped compiling saying "The target "Build" does not exist in the project".
I added an import to bring in the compiler, which worked fine on my machine but failed using msbuild on the build server.
I then changed a line from
to
and it worked on the build server as well.