93 questions
4
votes
2
answers
101
views
Why does dotnet restore on a .sln ignore `DownloadContentFiles` tasks in .csproj projects?
I have an .sln referencing a single .csproj. Inside the .csproj I download static dependencies into ASP.NET's wwwroot:
<Target Name="DownloadContentFiles" BeforeTargets="Restore&...
0
votes
1
answer
95
views
How to build a given csproj only on specified platform
I'm working on a project that generates bindings for a cross platform c library. The bindings are automatically generated for a specific platform. In my solution I have 3 projects.
Project.Windows....
0
votes
0
answers
87
views
Build csproj on Visual Studio without building references
Lets say you have a solution with projects A and B. A needs to B be build at least once so in order to be built with MSBuild i need it to be some kind of reference to setup the order of build.
But ...
1
vote
1
answer
589
views
SLN Configuration File : mapping issues
I want to customise the sln file of my solution to manage:
3 projects
5 configurations: Debug, Production_total, Production_Partial, Release and Recette
Each configuration should use "Any CPU&...
2
votes
2
answers
76
views
Can't use watcher.Filters.Add() function in .sln project
I am creating a project and I am using FileSystemWatcher, however I need to add multiple filters and watcher.Filters.Add() doesn't work. I am using .NET Framework ver. 4.8 and have .NET core 7.0.203 ...
0
votes
1
answer
46
views
How can I create a VisualStudio2015 solution from a given directory structure?
Suppose I have isolated some header and source files from a huge CMake C++ project.
C:\USERS\PC\SOURCE\REPOS\my_app_src
├───apps {a.hh, b.cc, c.hh, d.cc}
│ └───biosimulations {main1.hh, main1.cc, x....
0
votes
1
answer
219
views
Add external solution built by conan to cmake project
I'm trying to add a third-party library (let's say rttr) to the Visual Studio solution we generate through CMake.So I know if I create an editable package through Conan, then build it from source, I ...
0
votes
1
answer
716
views
msbuild error, "SetEnv" task could not be loaded from assembly Microsoft.Build.CppTasks.Common
I have msbuild version 14.0.25420.1 on my win10 command prompt computer, If I try to build a visual studio project file with this command:
msbuild .\folder1\WxsGenerators.sln
I get an error
BUILD ...
1
vote
1
answer
903
views
MSBuild Ignore absent <TargetFrameworks> for every .csproj in .sln?
The project that I've cloned locally uses the following dependencies:
<TargetFrameworks>netstandard2.0;MonoAndroid10.0;Xamarin.iOS10;Xamarin.Mac20;netcoreapp3.0;netcoreapp3.1;net40;net45;net46;...
-1
votes
1
answer
837
views
Visual studio git push failed, lost .sln and cannot recover project
This is my final assignment for my course. I worked really hard on it, and was supposed to push the files to a git repository. I tried doing so and it failed, I believe I pressed revert afterwards, it ...
1
vote
0
answers
349
views
How to publish multiple project (.csproj) file with individual folder using msbuild powershell
I have Solution(.sln) file , SLN have multiple project(.csproj). I need to publish all project in individual project Folder. I am using below powershell command , This below command publish all ...
0
votes
0
answers
73
views
How to run a c++ function using MSBuild targets?
I am using MSBuild and I came across this topic called Targets that lets you perform some tasks before building the project.
I need to run a C++ function which is present in a .cpp file in my (.sln) ...
0
votes
0
answers
51
views
Is it possible to use regexes in filtered SLN files?
Giving a simple SLN that contains the following project:
├───libs
│ ├───libA
│ │ Class1.cs
│ │ libA.csproj
│ ├───libB
│ │ Class1.cs
│ │ libB.csproj
│ └───libC
│ ...
1
vote
2
answers
2k
views
In Rider, how do I use an .sln file not in the project root folder?
Our code is structured as:
- Readme.md
- deploy.sh
- infrastructure/
-- stacker.yml
-- ...
- backend/
-- backend.sln
-- ...
- frontend/
-- package.json
-- ...
The default behavior when opening a ...
2
votes
1
answer
3k
views
How to include an <ItemGroup> across multiple .csproj files
Within Visual Studio (2019 in this case) solution, is there a way to specify an <ItemGroup> in a location that multiple .csproj files can use it within the solution?
As an example, this ...
0
votes
1
answer
981
views
How to restore nuget packages from .bat file when .sln file have 'Any CPU'?
My solution have a mix of Visual Basic and C# projects, in total 32 projects. When I rebuild from Visual Studio 2017, all projects restores from nuget.org. When I trigger a .bat file, only 16 of the ...
0
votes
1
answer
248
views
How to run .sln files on centos 7
Now i have search for several days how to manage to run SLN files on centos7.
I haven't still figure it out.
This is my last change to figure it out, so now i hope someone can help me.
I really ...
0
votes
0
answers
148
views
Can't See Namespace in other project
I have an asp.net web application project and a regular c# csproj project. My web application project doesn't see the namespace that's in my csproj project after I imported it in and added a reference ...
0
votes
1
answer
587
views
Aggregating .Net Core appsettings.json
I have multiple project under the same solution. My concern is the following:
Is there any way to aggregate all appsettings.json from different projects into one file in the same solution ?
1
vote
1
answer
103
views
How to prepare custom project solution to download from server
I want to prepare a general visual studio solution in c# programming language. But any user will download it a custom name. Is this possible. For example, my own project is prepered and filled like ...
0
votes
1
answer
66
views
VS2017 MVC project wont open from .sln but Team Explorer works fine
I'm working on a project which creates large XML files of 800k plus. I was having memory issues so I changed my IIS option in Tools>Options to 64 bit which helped. The problem worsened when my project ...
7
votes
2
answers
2k
views
Is there an easy way to add multiple projects to a solution?
In some solutions I use direct references to internal projects during development and switch to nuget references for release. However, adding 30+ projects to new solutions manually is a tedious task.
...
0
votes
0
answers
370
views
Publishing in multi-project solution fails with only one project can be specified
Hello i am trying to run dotnet -c Release [sourcepath] --output [destination] a project in a .sln that has multiple projects.
The file-structure of the solution is like this:
RootFolder
-.sln
...
1
vote
0
answers
1k
views
compiling c++ projects with sln file in ubuntu
This may be a stupid question, but I've been trying to compile a larger project that was originally associated with visual studio in Ubuntu. I settled on cmake to do this, but it needs a cmakelist ...
2
votes
1
answer
1k
views
Running dotnet test on webapi app with xunit
I am trying to setup a dotnet core webapi project with xunit, using latest versions, based on this guide :
https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test
(by the ...