C
C#2y ago
shivam51

❔ How to install a new .net project from github

I want to share my .net project in github what should be the installation steps for it? I can see all the dependencies in the .csproj file but how to install all of them in one go?
11 Replies
shivam51
shivam512y ago
shivam51
shivam512y ago
doesn't quite work, is that the complete syntax? I have nuget dependency itself. my folder structure
shivam51
shivam512y ago
shivam51
shivam512y ago
I expected to see files under Dependencies
shivam51
shivam512y ago
but dotnet build is failing, with an error messages that some namespace "name" does not exist. you mean the first line of Program.cs?
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<None Remove="Microsoft.CSharp" />
<None Remove="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
<None Remove="MongoDB.Driver" />
<None Remove="Entities\" />
<None Remove="Repositories\" />
<None Remove="Settings\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Entities\" />
<Folder Include="Repositories\" />
<Folder Include="Settings\" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<None Remove="Microsoft.CSharp" />
<None Remove="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
<None Remove="MongoDB.Driver" />
<None Remove="Entities\" />
<None Remove="Repositories\" />
<None Remove="Settings\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Entities\" />
<Folder Include="Repositories\" />
<Folder Include="Settings\" />
</ItemGroup>
</Project>
Mongo I was using MongoDB.Driver Sure, just a sec
shivam51
shivam512y ago
GitHub
GitHub - shivam-51/Play.Catalog: Sample .net API
Sample .net API. Contribute to shivam-51/Play.Catalog development by creating an account on GitHub.
shivam51
shivam512y ago
I had removed that mistakenly, thinking restore will fix it. so if someone clones this repo, what should be the set of commands to install everything and get the app running? dotnet run itself? okay so no build and no restore or anything
FusedQyou
FusedQyou2y ago
That's done automatically Restore always happens, and build happens if there are changes, or no build
shivam51
shivam512y ago
perfect. One more thing, does the folder structure look good?
arion
arion2y ago
restore places the dependencies in obj iirc
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts