Vivi_IX Posted December 22, 2024 Report Posted December 22, 2024 (edited) I have been working on a code mod for a few days, and so far so good. After closing visual studio and reopening it later on today though, I am now getting a build error and I have no idea where it is coming from. I am getting the following error message: C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "VintagestoryAPI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "VSSurvivalMod". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "VSEssentials". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "VSCreativeMod". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "0Harmony". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "VintagestoryLib". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "protobuf-net". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "cairo-sharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Data.Sqlite". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Build failed with 8 error(s) and 10 warning(s) in 0.9s The errors all refer to "error CS0246: The type or namespace name 'Vintagestory' could not be found (are you missing a using directive or an assembly reference?)" Is there a setting I have lost somewhere or an easy way to resolve this? I am using Visual Studio 22. Edited December 22, 2024 by Vivi_IX
Vivi_IX Posted December 22, 2024 Author Report Posted December 22, 2024 I think the issue is to do with Visual Studio finding the VintageStory API, Should I have anything set here (or anywhere else) for Cake to be finding the API properly?
Vivi_IX Posted December 22, 2024 Author Report Posted December 22, 2024 Thanks to help from Nat on the discord, this has been resolved. In case anyone else gets this error was caused by me breaking the environment variable. I had attempted to get Visual Studio to use a custom data path for mods when launching the client directly by changing the environment variable, and lost the link to the folder containing the 'assets', 'mods', and 'lib' folders - so yeah, don't do that. The is probably a way to specify the data path folder separately, but I will sort that later, this issue is fixed.
Recommended Posts