exporting the dependencies of a Visual Studio solution - build-process

I have a big project I am working on right now using Visual Studio 2008.
The solutions is composed by several project in Visual C# and Visual C++.
Clicking on a project node , and selecting from the manu the item "Project Dependencies" I can find the list of dependencies I want to export.
Do you know a way to export this list on a file someway?
Thanks
EO

They are already stored in the Visual Studio Solution and Project files.
Look for the <ProjectReference> tag.
With some post-processing, you could copy them from there and write them to another file.
You can also use the EnvDTE.BuildDependency class to retrieve the dependencies programmatically.

If you mean Project Dependency as opposed to Project Reference, the former just imposes a build ordering, they are stored in the solution file. Look for lines like
ProjectSection(ProjectDependencies) = postProject

Related

Create a VS 2017 extension to add new code file

I hope someone can point me in the right direction. I have two separate piece of code that functions outside of Visual Studio.
The last step performed by the second piece of code currently creates a new c# source file. I would like to combine both pieces of code into a single VSIX extension.
Unfortunately I have never worked with VS Extensions and I am a bit lost. I have worked through various VSIX examples, but none of these create files.
Can anyone perhaps point me to a working example of how to add new source files to a project via an extension?
I have seen some examples, but they all refer to old Add-In style plugins and not VSIX.
Create a VS 2017 extension to add new code file
As we know the Visual Studio Extensions is:
Extensions are add-ons that allow you to customize and enhance your
experience in Visual Studio by adding new features or integrating
existing tools. An extension can range in all levels of complexity,
but its main purpose is to increase your productivity and cater to
your workflow.
So, the Visual Studio extension is service for Visual Studio IDE to customize and enhance your experience in Visual Studio, rather than serving a specific project.
What I suspect the Project and item templates should be helps.
Hope this helps.

Where the data-tier application version number is stored in a Visual Studio project?

I have an utility which fills version numbers in AssemblyInfo.cs files. Now I need to implement a functionality to adjust version numbers for Visual Studio Data-Tier applications (DACPAC).
I see that I can adjust the number manually if I open project properties and click the Data-Tier application Properties button. But I cannot find where this number is stored in project files, so I have no idea how to update it automatically from my utility.
Do you know, where is the version number stored?
The properties do not appear in the .sqlproj file unless you change them from their default values. When you do they will appear as follows:
<DacDescription>This is my description</DacDescription>
<DacApplicationName>Database.Application.Name</DacApplicationName>
<DacVersion>1.2.3.4</DacVersion>
The dacpac version number doesn't appear to show up until after the first successful project build. After that however, it shows up as in .sqlproj file as shown below.

Can't upgrade from MVC2 to MVC3

I've got myself an MVC2 web applicatin using .NET Framework 4 and am following these instructions to the T. However at step 10 when I save the updated ProjectTypeGuids I get a message saying "The project file projectname.csproj cannot be opened. The project type is not supported by this installation."
I do have MVC3 installed and am running VS2010, so I don't know what could the going wrong. Anyone have any thoughts on the matter? Thanks!
EDIT:
For what it's worth. If I create a blank project from scratch, I have the ability to create a new MVC3 project. However, if I right click on my solution and click add->New Project... I can only add MVC2 projects. This leads me to think that the solution is configured somehow to only support MVC2, however I can't figure out how to change it.
There is an extra package which is ASP.NET MVC 3 Tools Update, you must download and install it too.
Solution 1:
Open the visual Studio Find In Files Dialog and Select your project folder, then search for old GUID and replace it with new one exactly. Backup the directory before doing this.
Actually You must select the whole solution folder and search all the files not a specific extension.
Solution 2:
You must take a careful look at your csproj and sln files and compare it with a working one on your system to find the difference. if you have file compare tools like winmerge, use it to compare files character by character

Are linked files supported in an ASP.NET 1.1 project?

Is there a way to have linked files in an ASP.NET 1.1 project?
What I did was to copy the linked file declaration from a DLL csproj to the file I want. But everytime I change the Web.csproj to add a new file, the links are deleted.
Is there a possible workaround? maybe inserting this in the build scripts or something like that?
Is this possible in .NET 2.0?
If you are using Visual Studio 2003 then linked files are not supported:
If you want to explicitly add an item as a link, you can create links
in the following projects:
The solution, Visual C++, and other similar projects support only links, so all of the items in these projects are links. The project
does not attach a link indicator (a small arrow) to the item icon in
Solution Explorer.
Visual Basic, Visual C#, and other similar projects can accommodate both linked and physical project items. Linked items in these projects
display a link indicator attached to the icons of linked project
items.
Visual Basic Web, Visual C# Web and other similar projects, do not
support links to items
http://msdn.microsoft.com/en-us/library/9f4t9t92(v=VS.71).aspx
You can work around this by creating a symbolic link (symlink) to the first instance of the file. The Link Shell Extension makes it easy to do so in Windows Explorer and it will even add an arrow badge to the file's icon (you have to use NTFS). Or use the command line program mklink:
> cd Project\Properties
> mklink AssemblyInfo.cs ..\..\Global\AssemblyInfo.cs
When you have created a symlink, it's as if the same file exists in both places. It's transparent to applications, including (I expect) Visual Studio 2003. This is not the same as a shortcut (.lnk file).
UPDATE: what I did in the end was to take another approach. I simply put a validation in my build script that if the csproj does not contain any reference to my AssemblyInfo files, the build failed.
This was ok because the only time they would be deleted, is when the csproj gets modified which is almost never.

Typed DataSets in WebApplication Projects

I am converting an older C# Website Project into a Web Application Project so that we can better manage it in our source control system. I have run into a problem.
The Website Project used strongly-typed-datasets (i.e. .XSD files). There is C# code written that uses these strongly typed datasets as an object. That worked fine when it was a Website Project but does NOT compile now that it is a Web Application project. The compiler can not find the reference to the datas set because datasets are not compiled.
Is there an easy solution to this problem?
You could use XSD.exe on the command line to generate the dataset classes into a class file and add the file to the new project.
xsd.exe StronglyTypedDataset.xsd /dataset
This will generate the file "StronglyTypedDataset.cs". Use the /namespace:My.Project.Namespace flag if you need to put the dataset classes into a specific namespace.
This is essentially what's going on behind the scenes in your website project.
There's a nice guide to integrate XSD compiler into Visual Studio (2003 - 2010). It might help you automate the process: http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio#Visual_Studio_2010_.2810.0.29
Another approach that worked for me when converting into a Web Application Project was to remove the .xsd file from the project and include it again.
VS 2008 automatically defined the "Custom Tool" property to use (MSDataSetGenerator) and re-creates the *.designer.cs file for me every time the xsd change.

Resources