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
Comments (3)
- 
        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
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- Addressables Profiles and Analyze windows no minimum window size
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Resolution Note (fix version 2018.3):
Microsoft have resolved this in new VSTU version