Skip to content

Fails to build VSCode lightweight MSbuild #350

@studentutu

Description

@studentutu

When using a default (working on all other Unity Projects) build of the project ( to check fo compilation errors):
.vscode/tasks.json

...
"tasks": [
   	{
   		"type": "dotnet",
   		"task": "build",
   		"group": "build",
   		"problemMatcher": [],
   		"label": "dotnet: build"
   	},
   	{
   		"label": "Build Unity Solution",
   		"type": "process",
   		"command": "dotnet",
   		"args": [
   			"build",
   			"my_custom_project_unity.sln"
   		],
   		"group": "build",
   		"problemMatcher": "$msCompile"
   	},
   ....

When running from from VSCode task - Build Unity Solution - will fail, with the following compilation errors:

C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\Library\PackageCache\com.github-glitchenzo.nugetforunity@b8a65750503c\Editor 
\NuspecFile.cs(197,34): error CS0103: The name 'ZipFile' does not exist in the current context [C:\Users\admin\Documents\UnityProjects\rebornech 
os\rebornecho_unity\NuGetForUnity.csproj]
C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\Library\PackageCache\com.github-glitchenzo.nugetforunity@b8a65750503c\Editor 
\Helper\CredentialProviderHelper.cs(262,38): error CS0103: The name 'ZipFile' does not exist in the current context [C:\Users\admin\Documents\Un 
ityProjects\rebornechos\rebornecho_unity\NuGetForUnity.csproj]
C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\Library\PackageCache\com.github-glitchenzo.nugetforunity@b8a65750503c\Editor 
\PackageContentManager.cs(333,23): error CS1061: 'ZipArchiveEntry' does not contain a definition for 'ExtractToFile' and no accessible extension 
 method 'ExtractToFile' accepting a first argument of type 'ZipArchiveEntry' could be found (are you missing a using directive or an assembly re 
ference?) [C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\NuGetForUnity.csproj]
C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\Library\PackageCache\com.github-glitchenzo.nugetforunity@b8a65750503c\Editor 
\PackageContentManager.cs(344,23): error CS1061: 'ZipArchiveEntry' does not contain a definition for 'ExtractToFile' and no accessible extension 
 method 'ExtractToFile' accepting a first argument of type 'ZipArchiveEntry' could be found (are you missing a using directive or an assembly re 
ference?) [C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\NuGetForUnity.csproj]
C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\Library\PackageCache\com.github-glitchenzo.nugetforunity@b8a65750503c\Editor 
\InstalledPackagesManager.cs(189,34): error CS0103: The name 'ZipFile' does not exist in the current context [C:\Users\admin\Documents\UnityProj 
ects\rebornechos\rebornecho_unity\NuGetForUnity.csproj]
C:\Users\admin\Documents\UnityProjects\rebornechos\rebornecho_unity\Library\PackageCache\com.github-glitchenzo.nugetforunity@b8a65750503c\Editor 
\NugetPackageInstaller.cs(217,38): error CS0103: The name 'ZipFile' does not exist in the current context [C:\Users\admin\Documents\UnityProject 
s\rebornechos\rebornecho_unity\NuGetForUnity.csproj]
    26 Warning(s)
    6 Error(s)

Time Elapsed 00:00:06.33

This makes UniRx unusable outside of the Rider / Unity Editor (cannot be used with VSCode agentic plugins), are there any options to remove dependency on NugetForUnity?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions