Gitlab-ci.yml Multi project - gitlab

I have a DLL in .net Framework 4.6 and an application .net Framework 4.6 with a reference project Dependency in the DLL.
When I run pipeline with MsBuild, I have an error CS0006 (dll not found).
How make to compile and Deploy the DLL in the same build directory of the App?
I search in a trigger (Downstream) and include project, but I haven't resolved my problem
Thinks you and sorry for my English :)

Related

Gitlab-ci.yml Dll net Framework

I have a DLL in .net Framework 4.6 and an application .net Framework 4.6 with a reference project Dependency in the DLL.
When I run pipeline with MsBuild, I have an error CS0006 (dll not found).
How make to compile and Deploy the DLL in the same build directory of the App?
I search in a trigger (Downstream) and include project, but I haven't resolved my problem
Thinks you and sorry for my English :)
I have try with a trigger but nothing

The type or namespace XXX could not be found(are you missing a using directive or an assembly reference?

I'm working on a project that targeting .NET 4.0 Framework. I added a reference to a third party dll file and call its methods in my code and have no error. But when I build the project it gave me The type or namespace error with blue underline on the methods of the dll. Using .NET Reflector I checked dll .NET Version of mscorlib.dll it is 4.0.0.0. My application Target .NET Version is 4.0 then Why I'm getting this error.
What I have done.
Remove all references to the library. Clean the project. Restart the project. again add the references. Not good in English please guide me. Stuck in it last 4 days.
Check if you have privileges to access the dll file. Then try running Visual Studio as administrator. If it does not help try to build the solution as 64x/86x not Any CPU.

Azure DevOps fails with error /usr/share/dotnet/sdk/2.2.105/NuGet.targets(499,5): error : Could not find a part of the path '/tmp/NuGetScratch

I am Developing an Azure Function solution where I have 2 class library and one Azure Function projects. I have already setup the Azure DevOps build and release pipelines. With my recent changes I am getting an error as /usr/share/dotnet/sdk/2.2.105/NuGet.targets(499,5): error : Could not find a part of the path '/tmp/NuGetScratch whenever the azure build pipeline is running.
I am not sure what made this problem. Any help is really appreciated.
I just figured out that the issue is with the project target framework. All my projects in the solution are in .Net Core 2.1 except one project (class library) was in .Net Standard. This was a mistake I had done while creating the class library project, I selected class library (.NET Standard) instead of selecting Class Library (.NET Core).
I removed that project (both from visual studio and file explorer) and create a new project with the same name but this time by selecting Class Library (.NET Core) and then copied my classes to this project.
That fixed my issue. Hope it helps.

References from Precompiled DLL

I've successfully built a Precompiled Function (DLL) and but ran into some issues regarding Reference from my DLL to other .Net Framework libraries.
I first tried to promote only my DLL to Azure and that failed due to missing dependancies. Next I tried to use Reflector to list the actual dependancies of my DLL and include them with Nuget but ended up just copying every DLL from my project bin directory to Azure and it worked.
So what how do I tell what libraries are actually included by the Azure Function environment and which I need to Nuget or upload myself. I couldn't find any documentation on the subject.
With the pre-compiled model, you need to bring your dependencies with the assembly where your function is defined (much like deploying a console or standard Web Application).
The simplest approach is to deploy the files from your assembly's output folder. The Azure Functions Tools for Visual Studio 2017 will do exactly that for you, giving you the ability to publish directly from VS.

trying to use c# to install .NET 4 GAC DLL

Uptil now, we've been using C# to install GAC DLL's to the GAC without any issues
System.EnterpriseServices.Internal.Publish p =
new System.EnterpriseServices.Internal.Publish();
p.GacInstall(filePath);
However, we tried using the same code to install a .NET 4.0 GAC DLL. It does not give any error and says that the GAC is installed.
However, when I look in C:\WINDOWS\Microsoft.NET\assembly folder I do not see the GAC being installed. Also, when I look up the event viewer on the Server it shows me a warning
"Source: COM+ SOAP Services Installation in the global assembly failed: <GACDLL_PATH>
Is there any way I can install a .NET 4.0 GAC DLL into the GAC programtically using C#?
I was able to resolve this issue
I rebuilt my C# project with the target framework 4.0.
Previously I was trying to install .NET 4 GAC DLL with a c# project that was built with the target framework 3.5...
After the project was rebuilt with .NET 4.0 framework I was able to install .NET 4 gac dll. Also, this is backward compatible i.e. you can install GAC DLL's created with previous versions of the .NET framework.

Resources