我用最新的補丁版本更新了我的VS 2015最近從那以後,我得到這個錯誤:xamarin應用程序並沒有編譯
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
輸出:
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Rebuild All started: Project: MoneyFox.Shared, Configuration: Debug Any CPU ------
1>C:\Users\nino\Documents\GitHub\MoneyFox.Windows\Src\MoneyFox.Shared\MoneyFox.Shared.csproj(333,3): warning MSB4011: "C:\Users\nino\Documents\GitHub\MoneyFox.Windows\Src\packages\Fody.1.29.4\build\portable-net+sl+win+wpa+wp\Fody.targets" cannot be imported again. It was already imported at "C:\Users\nino\Documents\GitHub\MoneyFox.Windows\Src\MoneyFox.Shared\MoneyFox.Shared.csproj (325,3)". This is most likely a build authoring error. This subsequent import will be ignored.
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): error MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\mscorlib.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
唯一的其他條目警告誰應該是原因。 奇怪的是,錯誤發生的項目沒有引用mscorlib。
在平臺特定項目引用的PCL共享庫部分中發生錯誤。因此這些不能建立。
我當前構建配置如下:
特殊的共享項目:
庫:https://github.com/NPadrutt/MoneyFox.Windows/tree/AndroidBackgroundService
我試圖修復VS但沒有改變什麼,完全重新安裝。 有趣的是,我可以在Windows 7電腦上構建它(但會改變運行時錯誤)。 此外,我不能再建立我的主分支,而且可以在幾天前建立。 這裏有什麼問題!?
編輯:我創建了一個新的可移植類庫和卸載所有其他項目..我也得到了同樣的錯誤,當我創建一個只有一個可移植的類庫的新項目。因此,似乎有什麼很錯了我目前的安裝...
這是一種常見的錯誤,可能不是問題。我經常這樣做,並且仍然能夠構建和部署得很好。你無法構建哪個項目?在構建失敗後,我會查看輸出窗口,看看那裏出現了什麼樣的錯誤 – hvaughan3
我從輸出中添加了日誌..據我所知只有一個警告。 – NPadrutt
嘗試從所有項目中刪除所有'/ bin /'和'/ obj /'文件夾,然後進行清理和重建。 – hvaughan3