csharp-web | official GitHub repository for the C # Web Development | Learning library
kandi X-RAY | csharp-web Summary
kandi X-RAY | csharp-web Summary
This is the official GitHub repository for the C# Web Development courses
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 csharp-web
csharp-web Key Features
csharp-web Examples and Code Snippets
Community Discussions
Trending Discussions on csharp-web
QUESTION
I have a solution, which consists out of 2 projects: regular class library for .NET 4.5 + website (not web application) project.
When I build this solution with Visual Studio - all referenced assemblies from Nuget packages and local references are copied to bin folder of website project.
If I try to build solution with MsBuild - bin folder of website project does not receive any assemblies.
Website project is not selected to be built in VS configuration (which is reported by message in both cases)
Edit - here is additional explanation.
When I clone a project from git - bin folder of website contains only 4 assemblies already checked in:
If I will run msbuild command with /t:Build or /t:Rebuild and /p:Configuration=Release;Platform="Any CPU" - I'll receive just an output of postbuild event in my other project, included in solution:
However, if I execute build from VS (Ctrl + Shift + b) in Release/Debug config - bin have all required assemblies for running web application.
Edit 2: Link to example solution - https://github.com/akuryan/csharp-website-test
When one builds it with msbuild TestApp.sln /t:Rebuild /p:Configuration=Release;Platform="Any CPU"
- this results in only Test.Core.* and LetsEncrypt.Umbraco.dll (initially checked in) found at ~\Test.Web\bin\
(where Test.Web is website project). If one builds TestApp.sln with VisualStudion 2015 (I suppose, 2013 and 2017 will be the same) - ~\Test.Web\bin\
gets whole amount of assemblies.
ANSWER
Answered 2017-Oct-13 at 06:52Different results with MsBuild and Visual Studio
That because the all dll.refresh
file in bin folder alongside the binary file are ignored by .gitignore
.
Since Web Site projects do not have any project file (.csproj) to put the assembly references, the *.dll.refresh
files are used by MSBuild to understand the assembly references. The contents of the file is the relative path to the .dll
via the packages folder for the solution. When you ignore all those .dll
.refresh by .gitignore
, MSBuild could not understand how to handle the dll
files.
To test this, I created a website project, add a nuget package to it, then delete the dll
files but keep the .dll.refresh
files in the bin
folder. Build the website project by MSBuild command line:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install csharp-web
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