I have 2 visual studio solutions. So I am working with 2 visual studio instances.
One project in the first solution is referencing to another project in the second solution.
When the dll is changed on the disc is not refreshed in my solution. I dont get all the metadata.
Is there anyway to auto load changed dlls?
Thanks
As Commented by #mcNets,
You can add two projects in a single solution & then assign
dependencies in the projects.
To assign dependencies to projects
In Solution Explorer, select a project.
On the Project menu, choose Project Dependencies.The Project Dependencies dialog box opens.
On the Dependencies tab, select a project from the Project drop-down menu.
In the Depends on field, select the check box of any other project that must build before this project does.
Your solution must consist of more than one project before you can create project dependencies.
Right click on your solution Choose Batch Build.
It will open the dialog where you can see all the projects in the solution.
Now check all the checkboxes in the build column for your project and also for the referenced project. both release and debug config.
Now click on build.
Once build is complete run your project.
Your problem will be resolved.
Related
I have a Visual Studio 2012 solution that has a second dependent project that contains our Telerik reports. The main project is published to our intranet server via a network path (//servername/folder) and includes a reference to the second project. The first time I tried to publish the project, I was told the report project's DLL was missing. Once I compiled the project as "Release", it published properly. So now I manually compile the report project before publishing the main project.
I am sure VS can do this all for me, but I can't figure out how to set it up, nor can I find any documentation explaining how to do this. Can anyone send me in the right direction?
Are they part of the same solution? Did you reference the other project using the "Solution" tab of Add Reference or by using Browse?
If they're part of the same solution, right click the solution and go to Properties -- not completely sure but I'd imagine setting up "Common Properties-->Project Dependencies" would affect build order.
I am an experienced developer who is completely new to C# and windows development.
I would like to contribute to Rocksmith custom song creator with a simple feature, but I don't even know how to build and run the project in Visual Studio 2012. I cloned the git repository, double clicked on devtools/devtools.csproj then Debug -> Start Debugging but I get an error about not being able to start a class directly.
You can browse the source code of the project at: https://code.google.com/p/rocksmith-custom-song-creator/source/browse/
From what I can tell, you have selected a sub-project in your solution to be the starting-project.
See, if there is project that defines a Window (WinForms or WPF), right-click this project and select it as starting project.
From MSDN
You can specify which project or projects within a multi-project solution Visual Studio will build and debug first.
To set a single startup project
In Solution Explorer, select the desired startup project within your solution.
On the Project menu, choose Set as StartUp Project.
The .csproj is just a project, you need to put that into a Solution (or open the solution included, if any)
Do you have a .sln file? Probably that's the one you must open.
I have Visual studio project about dataTier application, I prepared a project and in the same solution I have windows from application project.
I want to add as a reference dataTier project to Windows from project.
How can I do it?
Data tier Project in visual studio has no .exe or .dll file so I can not add it as a reference.
The Data tier Project will produce a .exe or .dll file if it compiles successfully on build. Looking in the Project Folder, you'll usually find it in the \bin\Debug or bin\Release subfolder (depending on which build configuration you've used).
But usually you don't want to add a reference in this way. If you right-click on a Project name in Visual Studio, you'll be presented with a menu which has an 'Add Reference' menu item. Click on this, then choose 'Projects' as the type of reference you want to add. You should see all other Projects which are included in the Visual Studio Solution. Just choose the one you want to reference and that's it.
EDIT: Ah, I realise now you're probably talking about the SQL Server Data Tier project type, which contains SQL scripts rather than compiled code so therefore can't be referenced by a C# project.
So, what are you actually trying to achieve here?
I have added the command BuildOnlyProject to the Menu. But it is always disabled. It is also disabled, when I select a Project-Node in the Solutionexplorer.
Does someone know why?
Thanks and best regards, Thomas
Visual Studio does not support project only builds for C# or Visual Basic projects, only for C++ projects. If you have a mixed solution with both C# and C++ projects in it you can select a C++ project in the Solution Explorer and you will see:
Build -> Project Only -> Build Only CPlusPlusProjectName
in the menu. Using this menu option will literally cause just a single project to be built as demonstrated by the output window. On the other hand, if you select a C# project, the "Project Only" sub-menu will be gone and the only way to build the project will be with:
Build -> Build CSharpProjectName
When you use this menu option the selected project and any other projects that the project depends on will also be built, often several projects in all.
This is why if you select a project that is not a C++ project the "Build Only Project" command will be disabled.
Do you want anything to happen that would be different from the command Build.BuildSelection? It seems that Build.BuildProjectOnly does not work, and MS seems to imply that what people want is Build.BuildSelection.
If you want to get dirty why not add a special build configuration to your project which only includes the one project you want to build
only the selected projects will be build.
MSBuild checks for a property called BuildProjectReferences. So if you're running MSBuild manually, you can issue:
MSBuild.exe My.Project.csproj /p:BuildProjectReferences=false
I had no problem with this in Visual Studio 2008 but it seems that VS 2010 is having an issue, and I'm betting it's probably me.
I have a solution with an ASP.NET Web Site Project and a few C# projects (BLL, DAL, Tests in NUnit). I have configured the build process for the test project to automatically run NUnit to run the tests. I would like to ensure that the BLL and DAL projects build before the test project so that the tests will run against the latest compiled version (yes, I know I could do this all in one project, but I'm choosing not to -- please bear with me :) )
So, I set the dependencies of the Test project to include the BLL, DAL, and Web Application projects, and the build order shows BLL, DAL, Web Application, and then Tests. However, I noticed that the BLL doesn't actually build when I build the Test project.
Any idea what this could be or any option I might be missing to force the other projects to build when I build the Test project?
Nick Craver mentioned checking the Configuration Manager to ensure you have the project selected to build for a given configuration.
However, to set the build order for multiple projects in a solution right click the solution and choose "Project Build Order..." from the context menu.
I'll expound upon my comment a bit here, for those having a similar issue.
Open up the configuration manager by right clicking on the solution and choosing Configuration Manager, then make sure build is checked for the appropriate project (for your current configuration) in the right-hand column here:
Maybe instead of setting order manually you could use Project Dependencies which allows you to specify build order indirectly.
In Solution Explorer, select a project.
On the Project menu, choose Project Dependencies. The Project Dependencies dialog box opens.
The Project Dependencies option is only available in a solution with more than one project.
On the Dependencies tab, select a project from the Project drop-down menu.
In the Depends on field, select the check box of any other project that must build before this project does.
To correct the issue happening in my VS2012, I did the following:
Right click Project Properties --> Common Properties --> Framework and References
Now you will find some projects shown on the Dependence Tab are missing in the "References" list.
Click "Add New Reference" to add the missing the projects.