I made a project in XNA 4.0 on one computer, which has VS2010 installed with TFS, while on another I have VS2012 installed and MonoGame 3.0.1 with it. Because MonoGame is essentially a continuation of XNA, code written for XNA 4.0 should work fine with MonoGame. However, the references go to different DLL files, and build slightly different. Is there a way to sync the source (.cs) and content files, but not the project and solution files in TFS?
What you could do is manually put all .CS files under source control using Team Explorer. So... don't put the project under source control, just the source files. It's very manual and you'd obviously need to manually check files in and out.
What I use are the TFS Powertools that integrate into Windows File Explorer to make this easier.
Actually you definately SHOULD synchronise the project, just don't add the files TO the project
Project 1 (xna) with no files
Project 2 (monogame) with no files
Both checked into TFS
Then add the files to a whole other root folder and check them into TFS
Then from each project, chose add existing file, and click the the split Arrow, there is an option to add a reference to the file (instead of including the file Inside the project)
That way everything (both projects and all code) are in TFS, and the code can be shared across both projects with no issues.
Related
I come from JS world and have to run an old ASP project to see its structure.
But I can't understand what kind of framework have been used to create this.
Have tried to build it with dotnet but it's not recognized.
Here is the projects screenshot can some body recognize it and tell me how to run it locally ?
I would try opening this would Visual Studio. That does look like a typcial asp.net web forms proejct.
If you ahve a ".sln" file in the root folder, then you should be able to open this project with Visual Stuido. (just download 2019, or latest 2022).
You will almost for certain want to open this project with VS.
If there is no .sln file in the root folder, then choose from VS to open as web site.
So, there are two ways to open/use/develop these older asp.net applications. the existence of a .sln file tends to tip you off as to which method you need (and want) to open up this applcation with. But, yes, you need VS .net "IDE" and the built in designers to work on this.
So, from your screen shot, go up one folder - look for a .sln file. That's the project file you want to try and open with Visual Studio.
As noted, if no .sln, or no .prj file exists, then use the open as web site option in VS.
Looks like a WebForms project, not sure about the state of WebForms support for VSCode but Visual Studio Community should be able to run this. Try loading this project with Visual Studio ensuring you have ASP Web development work load installed.
I am trying to install the Discord SDK for my C # console project for the sake of a test, but I am failing.
I have very little interaction with Visual Studio, with which I write the code, so please help with installing the SDK. I try to do everything according to what was said below, but perhaps I do not fully understand the sequence:
Open up that SDK zip that you downloaded.
Create a folder in your project directory called DiscordGameSDK and
copy the contents of the csharp/ folder to it
Build your solution then place the .dll in the directory of the .exe
(either x86 or x86_64 version depending on your compile platform).
If you compile for Any CPU you may need to perform additional
wrapping around DLL importing (like setting the DLL directory
dynamically) to make sure you load the correct DLL.
https://discord.com/developers/docs/game-sdk/sdk-starter-guide
I don't quite understand the third line of actions related to the solution, dll and exe files
Thanks in advance!
Since I'm writing in VS Code, I created a Discord Game SDK folder in my console project and moved all the files from the csharp folder to the DiscordGameSDK folder. After that, I compiled the project and transferred all the files from the lib folder to the bin/Debug/net6.0 folder
Visual Studio should work the same way. (Not sure)
enter image description here
I have an ASP.NET MVC project with one solution and 52 projects in the same solution. As you know, It takes long time to build whole solution. So I decided to unload some of the projects until there is some change or sprint task in the code in the unloaded project. However we are a team and use TFS version control and we need to use update unloaded assembly. So I have a build server that makes me sure whenever somebody starts to check-in (for example -> C:\bin in our network) the last version of all assembly can be found there.
I added C:\bin path as Reference Path to the UI Project (main project of the solution) of the solution and I expect when some projects is unloaded the reference comes to visual studio from the build server path (C:\bin) otherwise the reference of the project comes to Visual Studio from the nested project (not from build server).
But the reference can not be found when the project is unloaded:
And my Build server contains the assembly:
Finally I found a way (only in Visual Studio 2019) to unload projects and however use updated class library of unloaded projects. And thanks to Hooman Bahreini for his idea of using two separated solutions.
The way is that, there is a feature of Visual Studio 2019 that we can Save As Solution Filter which is in .slnf extensions. So I can unload some of my projects and check-in .slnf file via my source control (like tfs). So I have two solutions Now, one is .sln which is contains all of projects and the other one is .slnf which is unloaded some of projects in it.
The things can we do is that whenever I want to get my project I have to use .sln file and builds that and then close the file and then open the .slnf file (I'm sure that I have updated class library of unloaded projects) and do my task and check-in my changes.
What's the purpose of using solution files for DotNet Core projects? I'm using a Mac, and I can use project-to-project reference to modularize and build shared libraries without solution files:
dotnet add reference ..\Library\Library.csproj
which adds the following to my current directory's .csproj file:
<ItemGroup>
<ProjectReference Include="..\Library\Library.csproj" />
</ItemGroup>
And now building my current directory's .csproj will build Library.csproj.
Solution file works as container for application's project/projects. It comes handy when you are working on your application out of IDE. Following are some of uses of solution file.
Open project or multiple projects in IDE just by opening solution file in IDE. e.g. If you open solution file in visual studio then all of projects which are part of solution will get opened in visual studio.
You can control build/deployment of projects (what to build and what not to) under solution using solution level configuration.
If you are using editor like VS Code then solution file facilitate to build all those project which are part of solution just by running "dotnet build" command. If projects were not part of solution then you need to build them individually.
When working out of IDE (like Visual Studio) and source control you can add all project files and solution to source control just by adding solution to source control. Same goes with check in or checkout.
These are some of advantages of solution file and there can be many more. However solution file is not must have thing and you can still live without it. Its just makes developer's life easy and improves productivity.
I am building a Xamarin app in Visual Studio, but am having problems with the source control, which I think is because I don't have a nuget.config file.
Firstly, do I need one per solution or one for the whole project, or alternatively just on in the PCL etc.
Secondly (the main question), is it possible auto-generate these files based on the nugets you currently have installed? Also, when these are updated, is it possible to keep the nuget.config file up to date?
Update:
In Visual Studio the Manage NuGet packages for Solution option which was present in past versions is not displayed for my project, not sure if this is the software version or the projects configuration.