NuGet | local nuget repository for hosting modules | Runtime Evironment library
kandi X-RAY | NuGet Summary
kandi X-RAY | NuGet Summary
Creates a local nuget repository for hosting modules or packages.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of NuGet
NuGet Key Features
NuGet Examples and Code Snippets
Community Discussions
Trending Discussions on NuGet
QUESTION
I used the database first approach. The model is right (or at least it looks like) But I always get this error. Please, I've already tried so many things.. The full code of my program (and even sql script by which I create my database) is here: https://github.com/AntonioParroni/test-task-for-backend-stack/blob/main/Server/Models/ApplicationContext.cs
Since I have a mac. I created my model with dotnet ef cli commands (dbcontext scaffold) I can use my context. But I can't touch any DbSet..
...ANSWER
Answered 2022-Mar-31 at 09:23You have net6.0
target framework which is still not released while you have installed EF6 which is a previous iteration Entity Framework (mainly used with legacy .NET Framework projects) and you also have EF Core (a modern iteration of it) but older version - 5.0 (which you are actually using for your context, see the using Microsoft.EntityFrameworkCore;
statements there).
Try removing EntityFramework
package and installing preview version of Microsoft.EntityFrameworkCore.SqlServer
(possibly just updating to the latest 5 version also can help) and either removing completely or installing preview version of Microsoft.EntityFrameworkCore.Design
. (Also I would recommend to update your SDK to rc and install rc versions of packages).
Or try removing the reference to EntityFramework
(not Core one) and changing target framework to net5.0
(if you have it installed on your machine).
As for why do you see this exception - I would guess it is related to new methods added to Queryable
in .NET 6 which made one of this checks to fail.
TL;DR
As mentioned in the comments - update EF Core to the corresponding latest version (worked for 5.0 and 3.1) or update to .NET 6.0 and EF Core 6.
QUESTION
I have an Azure pipeline setup for my builds. I have been running into this issue recently and cannot figure out a way to fix this:
...ANSWER
Answered 2022-Mar-16 at 06:02From Agent pool - Change Agent Specification from Window-Latest to Window-2019 ,It seems MS has done some changes in default agent
QUESTION
I want to remove the TargetFramework specifier from my project files and pass it via the commandline. Sounds easy:
...ANSWER
Answered 2021-Oct-19 at 07:52Since dotnet restore
and dotnet build
are wrappers around dotnet msbuild
, you can use all MSBuild switches to change behavior of build system.
Here we need to set target framework, which can be done by
- setting property in project file:
net5.0
OR
- setting property through command line docs:
dotnet restore -p:TargetFramework=net5.0
OR
- setting environment variable which is not recommended (by me)
QUESTION
When attempting to publish my Xamarin Forms app, I get the following error from Google Play console
We've detected this app uses an unsupported version of Play billing. Please upgrade to Billing Library version 3 or newer to publish this app.
I don't use any billing library. I've tried updating all nuget dependencies, to no luck. How do I fix this error so I can publish my app?
...ANSWER
Answered 2021-Nov-11 at 23:11Apparently I had BILLING
permissions set in my manifest. Removing these fixed the issue.
You can do this by right-clicking the project --> Properties --> Android Manifest --> Searching for BILLING
under "Required Permissions" and unchecking it
Alternatively, open AndroidManifest.xml
and delete the line
QUESTION
I'm completely new to trying to implement GitLab's CI/CD pipelines, but it's been going quite well. In fact, for my ASP.NET project, if I specify a Publish Profile in the msbuild
command that uses Web Deploy, it actually deploys the code successfully to the web server.
However, I'm now wanting to have the "build" job create artifacts which are uploaded to GitLab that I can then subsequently deploy. We're using a self-hosted instance of GitLab, for which I'm not an admin, but I can speak to the admin if I know what I'm asking for!
So I've configured my gitlab-ci.yml
file like this:
ANSWER
Answered 2022-Feb-08 at 15:22After countless hours working on this, it seems that ultimately the issue was that our internal Web Application Firewall was blocking some part of the transfer of artefacts to the server, or the response back from it. With the WAF reconfigured not to block traffic from the machine running the GitLab Runner, the artefacts are successfully uploaded and the job succeeds.
This would have been significantly easier to diagnose if the logging from GitLab was better. As per my comment on this issue, it should be possible to see the content of the response from the GitLab server after uploading artefacts, even when the response code is 200
.
What's strange - and made diagnosing the issue even harder - is that when I worked through the issue with the admin of our GitLab instance, digging through logs and running it in debug mode, the artefact upload process was uploading something successfully. We could see, for example, the GitLab Runner's log had been uploaded to the server. Clearly the WAF's blocking was selective and didn't block everything in both directions.
QUESTION
I'm trying to install playwright on my deployment target machine in order to run UI tests.
...ANSWER
Answered 2022-Feb-03 at 19:25You need to execute playwright install
in the folder that contains the csproj
or use -p
to specify the project file
QUESTION
I seem to be having an issue with running projects after upgrading to Visual Studio 2022 and installing Net 6.0 SDK. Whenever I open an existing project or even create a new one I get the below errors with the Dependencies.
If I try building the project I get the error:
There aren't any errors in the Error list.
Tried a few things but still nothing helps :
I've tried reinstalling Visual Studio 2022 and Net 6.0
- Tried unloading and reloading project
- Tried clearing Nuget cache
- Tried removing bin,obj, csproj.user,.vs folder
If I try building/debugging a project in Visual Studio Code everything works normally so it doesn't seem to be an issue with the SDK.
Also noticed that I am unable to open the Nuget Package Manager UI but the .csproj file is correct and void of any errors.
Anyone have any ideas on how to resolve this?
...ANSWER
Answered 2021-Nov-24 at 16:52have you tried dotnet build
? that usually forces auto resolving of dependencies!
I've also faced similar issues in recent days after the final release of 2022.
QUESTION
We have Xamarin.Forms solution with iOS and UWP projects. We use Azure pipelines to build the iOS project. Until yesterday everything was working fine. Now the build fails at the NuGet Restore step with the error:
##[error]The nuget command failed with exit code(1) and error(/Users/runner/work/1/s/"MyProjectName.UWP".csproj : error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project.
We can see that the problem occurs when trying to restore NuGet packages for the UWP project on the Mac OS build host. Image: macOS-11
Workaround will be to exclude it from the solution, but we are using it for testing purposes and this is not a good option for us.
...ANSWER
Answered 2022-Jan-26 at 09:39- Updated Answer This can be resolved using MSBuild task instead, as the collogues mentioned below. However, in my case this still lead to the same error. After investigating the pipeline. The root cause has been identified: Both in MSBuild@1 and XamariniOS@2 tasks you should target the specific iOS Project and not the solution file, like so:
" - task: MSBuild@1 inputs: solution: 'PathToIosProject/myproject.iOS.csproj' configuration: '$(BuildConfiguration)' msbuildArguments: /t:restore
" - task: XamariniOS@2 inputs: solutionFile: PathToIosProject/myproject.iOS.csproj' configuration: '$(BuildConfiguration)' packageApp: true signingIdentity: $(APPLE_CERTIFICATE_SIGNING_IDENTITY)
- Old Answer
We have managed to resolve the issue. The root cause of it seems to be an update to the mono framework in the MacOS pipeline build agent. In order to fix it, we need a script for downloading and installing an older version of the mono framework as a first step of the build pipeline like so: link to the pipeline tasks photo
This is the code of the bash scrip used in the task:
#!/bin/bash set -ex
MONO_MACOS_PKG_DOWNLOAD_URL='https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.100.macos10.xamarin.universal.pkg'
mkdir -p /tmp/mono-install cd /tmp/mono-install
mono --version
wget -q -O ./mono-installer.pkg "$MONO_MACOS_PKG_DOWNLOAD_URL"
sudo installer -pkg ./mono-installer.pkg -target /
mono --version
ls -alh /Library/Frameworks/Mono.framework/Versions/Current
QUESTION
I'm attempting to scaffold the Identity pages for a new .NET 6.0 project (created from the ASP.NET Core MVC template). When I run the following command I get the error "path is empty" (I also included the build command output to show the project builds successfully).
...ANSWER
Answered 2022-Jan-20 at 15:49As mentioned by the comment on the question and on this site
https://github.com/dotnet/Scaffolding/issues/1713
Removing the nuget package Microsoft.AspNetCore.Identity
from all projects in the relevant solution solves the problem.
In many cases (also in mine) its enough to reference the nuget package Microsoft.AspNetCore.Identity.EntityFrameworkCore
QUESTION
I have a Razor Class Library that I've been using for months with .NetCore3 then .NetCore 5 without a problem.
After recently updating our blazor server application and our Razor Class Library to .NetCore 6 I've hit a problem loading the assets from the Razor Class Library.
The RCL is built and packaged via nuget and I can see the assets in the package, for example;
The web application has been updated to use a single program.cs and I'm using WebApplication.CreateBuilder()
with options for my setup.
ANSWER
Answered 2021-Nov-29 at 14:51So my problem was with the way Azure was building the RCL solution and packaging the RCL in a nuget package.
I had to update my build YML to use 2022 image, and v6.0 of .NET and nuget:
Changed
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install NuGet
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page