$(Platform) expands to "Any CPU" instead of "AnyCPU" (no space)
I was trying to determine why AppVeyor was failing to build my dotnet project, even after adding both nuget restore and dotnet restore in the prebuild script.
Project:
https://ci.appveyor.com/project/kornman00/vita
Attached is MSBuildDetailed.txt, which is the output I get locally when building my project with VS2022.
Attached is AppveyorOutput.txt where it failed with:
error NETSDK1004: Assets file 'C:\projects\vita\_obj\v170\KSoft\Debug\AnyCPU\project.assets.json'
But digging deeper we can see:
[00:00:13] nuget restore
...
[00:00:32] Writing assets file to disk. Path: C:\projects\vita_obj\v170\KSoft\Debug\Any CPU\project.assets.json
...
[00:00:37] dotnet restore
...
[00:00:44] C:\projects\vita\Vita.sln.metaproj : message : Property 'Configuration' with value 'Debug' expanded from the environment.
[00:00:44] C:\projects\vita\Vita.sln.metaproj : message : Property 'Platform' with value 'Any CPU' expanded from the environment.
...
[00:00:45] Building solution configuration "Debug|Any CPU".
...
[00:00:45] Property reassignment: $(Platform)="AnyCPU" (previous value: "Any CPU") at
nutget restore used a path that had Any CPU with a space. When msbuild in appveyor ran, there was a property reassignment to change Platform to AnyCPU without a space and this caused failures further down.
I am using the web interface to configure the project settings and there's no way to set/select Platform as "AnyCPU". I imagine I can possibly work around this with an appveyor.yml in my git, but I thought this worth pointing out as this very much seems like a compatibility problem on the Appveyor side when compared against out of the box behavior in Visual Studio.
- AppveyorOutput.txt 2.99 MB
- MSBuildDetailed.txt 4.23 MB
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

1 Posted by Sean on 01 Mar, 2026 03:05 AM
I tried updating my .sln to use "AnyCPU" but then Appveyor fails to build it because it is trying to use "Any CPU" in the environment
https://ci.appveyor.com/project/kornman00/vita/build/job/ccx0yvnsxw...