Search Issue Tracker
Fixed in 2018.3.X
Votes
2
Found in
2018.2.0f2
Issue ID
1059037
Regression
No
Project file has no matching compilation unit
Project file has no matching compilation unit
1. What happened
The following error is thrown:
NotSupportedException: Visual Studio Tools: Project file has no matching compilation unit for <AssemblyName xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2. How we can reproduce it using the example you attached
1. Create new empty Unity3D 2018.2.0f2 project
2. Exit unity and find the project folder in windows explorer
3. Create a new folder under Packages called com.test.compilationunit
4. Add a package.json to this folder that contains:
{
"name": "com.test.compilationunit",
"displayName": "no matching compilation unit",
"version": "0.0.1",
"unity": "2018.2",
"description": "Try to repo project file has no matching compilation unit for.",
"dependencies": { }
}
5. Add a PackageComponent.cs to this folder that contains:
using UnityEngine; public class PackageComponent : MonoBehaviour {}
6. Load this project in Unity
Observe: Package "no matching compilation unit" has loaded without errors
7. Add a UsePackage.cs to the projects Assets folder that contains:
public class UsePackage : PackageComponent {}
8. Give the unity editor focus so it rebuilds
Observe: no errors
9. Exit Unity
10. Move the folder you created in step #3 to somewhere else, maybe C:\com.test.compilationunit
11. Update the projects manifest.json to include the new package location
{
"dependencies": {
"com.test.compilationunit": "file:C:\\com.test.compilationunit",
"com.unity.ads": "2.0.8",
12. Load the project in Unity
Expected: the package to still load without errors
Observe: the package has the error NotSupportedException: Visual Studio Tools: Project file has no matching compilation unit for <AssemblyName xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Solution:
Please install these 2 updates from Microsoft:
https://xamarin.azureedge.net/vstu/dev15/3.8.0.3/vstu2017.msi
https://xamarin.azureedge.net/vstu/dev15/3.8.0.3/SyntaxTree.VisualStudio.Unity.vsix
-
shubhamswaraj2021
Aug 18, 2020 05:29
good one <a href="https://www.lyricsauto.com">lyricsauto</a>
-
vordioni
Dec 14, 2018 10:52
Reproduced on Unity 2018.2.14f1
-
M_R
Jul 26, 2018 11:52
same problem on osx.
VS for mac version: 7.5.4 (Build 3)
vs4m tools for unity version: 1.5.0.1
Unity 2018.2.0f2is there an equivalent vstu update to download?
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- VFX Graph Memory leak when calling the ClearPropertyBinders and AddRemoveVFXProperty
- Entering "Configure Avatar" inside the Inspector locks it
- [Render Graph Viewer] Resource list icons cropped and in inconsistent positions
- Scene View with Debug Draw Mode enabled is gray when GPU Resident Drawer is enabled
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
Resolution Note (fix version 2018.3):
Microsoft have resolved this in new VSTU version