Is there a way to find out which .Net version i.e. 1.1 or 2.0 or 3.0 etc.. was used to create a web project. I have files like .aspx, .aspx.vb, web.config etc but need to figure that out.
Also how to open the existing ASP.Net project in Visual Studio environment. I have received files from another person but for security reasons he do not want to share the complete project but only selected files. We both would like to know what is the bare minimum files which needs to be shared to open an existing project (I mean apart from the .aspx, .aspx.vb files which needs to be modified)
Thanks
If its ASP.NET project check the <assemblies> element in web.config its must contain versions of each assembly you use.
Please try this:
Open Visual Studio.
Click on File -> Open -> WebSite (Or press Alt+Shift+O).
Select the folder which containing your file (aspx, aspx.vb, web.config)
In most of the cases it will open the folder as web site and you can run it with F5.
I don't think the files you mentioned will contain any references to the version of .NET they were build under, not unless they feature version-specific code & functionality (LINQ for 3.0+. generics for 2.0+ etc).
In order to open an actual Web project in Visual Studio, you need the project file. Without that you will only be able to open individual files.
Related
I just simple know that is a published project, but how to open that file as a project? Here is the story, I got a file from a contractor with all the project and the pages and I would like to check the code and run the project from Visual Studio 2017.
Sorry about my ignorance and thanks in advance.
You can't.
What you can do though is create an ASP.Net Project (e.g. .csproj) and then right-click on a folder or the root of that Project and select "Add Existing Web Site...". This adds your site to that solution.
Note that .publishproj projects ("Web Site" Projects, aka "Web Applications") are not really compiled/built. (Though they can be pre-compiled, but that's not the same thing).
Web Sites are "published" not "built". Note that publish profiles (.pubxml) files are stored in /App_Data/PublishProfiles folder and work very much the same as .csProj files. In fact MSBuild will recognize some of the same elements, such as <task> and <using>. You just have to manually add them.
I have a ASP.NET project which relies upon the FreeImage .NET wrapper. This is loaded using a reference to a external directory. The wrapper relies upon the FreeImage.dll being present to work (clearly).
How do I get Visual Studio to include a reference to the FreeImage dll. It's not a .NET assembly, i think it was built in something else (so I can't add it as a reference).
I don't really want to have a copy for this project as these files reside in a different SVN repository
Add a pre-build macro/script to copy the file across each time you build. There's no way to add a symbolic link into a visstudio afaik.
I am assuming the .dll was built using a .NET supported language like C#.
You can just right click over the site and select 'Add Reference'.
Browse to the .dll you are looking for and then click 'Ok' to add it.
It should add a .refresh file to your site and the dll. The .refresh file is what is checked into your source control letting the site know the relative location of the .dll to the site.
I've got a question about something that's just been irritating me.
A colleague and I are building a support framework for our current client that we want to reference in other projects.
The DLL we want as a reference in our project would be an external reference. We're adding it by doing "Add Reference...", then browsing to the location of the .dll. What I want Visual Studio to do is only add the .xml, .pdb, and a .dll.refresh file, but instead it copies the actual .dll (and .xml and .pdb) into the bin.
When we rebuild the framework project, the other project that uses its .dll gets all out of whack until we drop and re-add the reference. Everything I've read online says that VS2008 is supposed to create the .dll.refresh files for you, but it never does.
Any ideas? Am I missing something or doing something wrong?
At this point I'm ready to add a pre-build event to simply copy the framework .dll into my bin, but the .refresh file seems like less of a hassle if it would just work.
Thanks.
UPDATE:
This SO post describes the actions that are supposed to be happening with the refresh files.
So it turns out that .refresh files are only created for Web Site projects, not Web Application projects.
The problem stems from Visual Studio having trouble deleting lock files for DLL references over 64kb, a problem supposedly fixed in VS 2010.
The current workaround is to close and reopen the solution or to unload and reload the project containing the references.
If the Projects are in the same Solution and you add a "Project Reference" that should solve your problem.
You can try to add references another way.
Add reference
Choose tab Browser (Not tab Project)
Choose *.dll that you need
I have tried it and been successful.
If you choose tab Project --> there are no *.dll.refresh added
I had a web reference set in my VS2008 ASP.NET project, but due to some source control weirdness it is no longer listed in the project.
I have the set of files in the Web References folder under my project. There's a .wsdl, .disco and several .datasource files.
Is there any way to re-add this web reference through the existing files rather than using the "Add Web Reference" dialog?
Resolved now.
The project file had all the references in the source control version, but the source control insisted the local file matched the server version.
Digging through the file's history showed that my local version didn't match and an update resolved it.
I think Source Safe needs the repair utility running on it.
I have a web site project with a lot of files, it has become really slow to build. What I want to do is to create a web application project, and in Explorer add all the files to it, including the Bin folder. In Visual Studio I will not add these files (Show All Files will show them), only new files in one new folder that I am going to work on.
There are several assemblies in the original Bin folder that I need to reference in the web application project. Also, I will include the original web.config file.
So what way am I going to regret this in a few days?
You wont have support for all the old stuff when using the Visual Studio Publish feature (I assume you wouldn't anyways).
I also would assume you wont have access to what is in your App_Code from your new web application project.
I will add an answer myself.
A rebuild in Visual Studio will clean out the bin folder...