1
Compile v8.9.0.0 - Multiple Errors - netstandard 2.0.0.0
Problem reported by Kent Robinson - 7/1/2022 at 11:54 AM
Resolved
Using VS 2022, build solution results in numerous CS0012 errors:
You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
.NET Framework 4.6.1
Any help with resolution?

12 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
I justed tested compiling source code package of v8.9.0.0 with VS 2022 and it works?
Did you load GleamTech.FileVista.sln solution file?

Don't delete TargetFrameworks for sub projects. FileVista project will use net461 target but sub projects target both net461 and netstandard2.0.
 
0
Kent Robinson Replied
"Did you load GleamTech.FileVista.sln solution file?" No. I did update NuGet packages before compiling.
"Don't delete TargetFrameworks for sub projects." I did not change this.
I will try clean compile again without updating packages. Thanks for your assistance.


0
Cem Alacayir Replied
Employee Post
One possible issue is that you deselected .NET SDK (not the .NET Framework SDK) with your VS 2022 installation. Open Visual Studio Installer and ensure .NET SDK is selected and maybe also .NET 6.0 Runtime. Even if you don't use .NET (formerly .NET Core), for building sub projects you need the SDK.
0
Kent Robinson Replied
No joy. Build output:
Build started...
1>------ Build started: Project: GleamTech.Common, Configuration: Debug Any CPU ------
1>E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.Common\AspNet\Core\WebActivationMiddleware.cs(29,26,29,41): error CS0012: The type 'MulticastDelegate' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
1>E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.Common\AspNet\Core\WebActivationMiddleware.cs(33,40,33,55): error CS0012: The type 'MulticastDelegate' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
1>Done building project "GleamTech.Common.csproj" -- FAILED.
2>------ Build started: Project: GleamTech.FileUltimate, Configuration: Debug Any CPU ------
2>CSC : error CS0006: Metadata file 'E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.Common\bin\Debug\net461\GleamTech.Common.dll' could not be found
2>Done building project "GleamTech.FileUltimate.csproj" -- FAILED.
3>------ Build started: Project: GleamTech.FileVista.Core, Configuration: Debug Any CPU ------
3>CSC : error CS0006: Metadata file 'E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.Common\bin\Debug\net461\GleamTech.Common.dll' could not be found
3>CSC : error CS0006: Metadata file 'E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.FileUltimate\bin\Debug\net461\GleamTech.FileUltimate.dll' could not be found
3>Done building project "GleamTech.FileVista.Core.csproj" -- FAILED.
4>------ Build started: Project: GleamTech.FileVista, Configuration: Debug Any CPU ------
4>CSC : error CS0006: Metadata file 'E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.Common\bin\Debug\net461\GleamTech.Common.dll' could not be found
4>CSC : error CS0006: Metadata file 'E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.FileUltimate\bin\Debug\net461\GleamTech.FileUltimate.dll' could not be found
4>CSC : error CS0006: Metadata file 'E:\Users\krobi\Documents\Visual Studio 2022\Projects\FileVista-v8.9.0.0-Source\GleamTech.FileVista.Core\bin\Debug\net461\GleamTech.FileVista.Core.dll' could not be found
========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========

0
Kent Robinson Replied
Just saw your second post. Will try that solution.
0
Kent Robinson Replied
Should I install 4.6.1 SDK?
0
Cem Alacayir Replied
Employee Post
> No. I did update NuGet packages before compiling. 

FileVista source code package is self-contained does not depend on any NuGet packages, you just open GleamTech.FileVista.sln with VS 2022 and compile. Also note that the DLL's produced by the compile can not be mixed/used with our product NuGet packages.

FileVista-v8.9.0.0-Source\ProductReferences\Unsigned\net461 folder contains unsigned version of DLLs used only by FileVista source package. The projects reference these not the NuGet packages.
0
Cem Alacayir Replied
Employee Post
> Should I install 4.6.1 SDK?
No, .NET Framework 4.8 SDK and targeting pack should be sufficient as it's backwards compatible.

0
Kent Robinson Replied
The build output posted above is clean compile after loading the solution and without NuGet update (thanks for that information). I will study a bit more at my end and report back. Thanks Cem.
0
Cem Alacayir Replied
Employee Post
Ok good to know. By the way, I just noticed we were stripping netstandard2.0 targets from projects (from TargetFrameworks element) for FileVista source code package so you shouldn't even need the .NET SDK.

Your problem was simply maybe not opening GleamTech.FileVista.sln with VS 2022.
0
Kent Robinson Replied
I think I have a permissions issue. I moved the code to my VS 2019 projects folder and build resulted in this:
I suspect the warning came up in in the VS 2022 projects folder and I did not see it a "allow". I will fix that and report back.
0
Kent Robinson Replied
Marked As Resolution
Cem,
I am sure this my issue. [Palm to forehead.] One would assume that running a Microsoft application as an administrator would automatically allow access to protected folders without further intervention. Apparently not. Thanks again for your time.

Reply to Thread