I built an asp.net MVC project and it was working perfectly. I played with it a little more, and doesn't work anymore. Is there a way to rollback the application?
Unless you used some sort of version control system such as GIT, there's no such functionality built-in that would allow you to revert back to some previous state of your code. I would strongly recommend you using version control for all your projects.
Related
Which version of Visual Studio can be used to open a project which is built as ASP Web project
I have Community edition 2019 Does this support ASP projects?
I know these days no one is using ASP for building web apps The purpose is to maintain an existing ASP solution for a couple of more months 9If any bug fix requests from the client comes ) and start to build a new project using the latest version of Microsoft technologies
Visual Studio
Most versions of Visual Studio support editing Classic ASP code, couple of things to keep in mind though.
Frontpage Server Extensions is no longer supported, the best approach is to use a mapped drive or better yet store the code in source control (Git, SVN etc.) and work with the code locally (can bind to a local instance of IIS).
The IDE can be quite cumbersome for working with Classic ASP as it's designed for more modern technologies.
It also has sophisticated debugging through the IDE via the "Attach to process" which will work with Classic ASP running in IIS as long as the web application has been configured correctly for debugging. See How do you debug classic ASP?.
Visual Studio Code
Another option is Visual Studio Code which is a free IDE built on the principle of open source projects for cross-platform. It's becoming a popular free IDE for many developers rivalling the likes of Atom, Sublime etc.
It's lightweight and extensible through extensions, there are already some useful extensions for Classic ASP including this one;
Name: Classic ASP Syntaxes and Snippets
Description: Classic ASP Language Support and Snippets from tmBundle
Publisher: Jintae Joo
It also has built-in support for popular source control solutions like Git and more powerful available through the extension marketplace that is built into the IDE. If you do use Git would recommend installing the GitLens extension.
Every version of visual studio since I started with 2010 (was there something before it?) handles Classic ASP just fine. I'm on VS2019 right now.
I even have a project which is a combo Classic ASP, Webform, and MVC all in one project, with some session sharing, and I routinely code and debug in all. The only limitation is that when you debug, you have to choose whether you're debugging Managed code or "script".
With each I "attach to process" and choose which code I want to debug. Classic ASP debugging is fantastic, and I can't believe more people don't do it. I see basic questions on here which would easily be fixed with standard debugging techniques (settings breakpoints, evaluating variables).
The ONLY thing which isn't supported is code formatting inside <% %> blocks. If I ever get some time maybe I'll make an addon for it.
I have a huge enterprise asp.net application that perfectly builds and runs on servers. We've been using Visual Studio 2013 in our workflow. Now we want to migrate to newer IDEs. But if I build this application in Visual Studio 2017 I'll get this error.
Error BC40004 sub 'PreInit' conflicts with event 'PreInit' in the base class 'Page' and should be declared 'Shadows'.
I think it's a problem with VB compiler version (again vs2013 builds project). Do you have any idea how to fix this?
My solution contains 40+ projects. The main project is asp.net webforms app written in VB.net. Other projects are services and code libraries written in C#.
I tried to specify VB.net version in .vdproj manually. But it didn't solve my problem.
edit: Fine. Thank you all for your responses. I got that problem is about code and that visual studio analyzer has changed a lot in the last few years. I'll try to find out the reasons why this code have been working without exceptions.
BC40004 is a warning, this shouldn't prevent you to compile the solutions unless you set the Treat warnings as errors on the project's property under the tab compilation.
I'm trying to add a full framework class library as a project reference to asp.net core 2.0 MVC project and getting the below error.
Project XYZ is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0).
Project XYZ supports: net462 (.NETFramework,Version=v4.6.2)
I have updated to the most recent version of Visual studio i.e, 15.3.5.
Is it even possible to reference 4.6.2 libraries in core 2.0 projects?
The first thing that you can try is to compile the library you want to consume as netstandard2.0.
Theoretically (according to the .net standard documentation), this will make it compatible with projects using net461 and later as well as netcoreapp2.0 and later.
In practice, sometimes you will end up with a problem with one of your dependencies that don't provide the same library version across different compilation targets.
In such cases you may simply need to add the .net core 2.0 as a target framework for the XYZ library.
The xml tag listing the targets is <TargetFrameworks> in the XYZ.csproj file and is not handled by the Gui of the project's properties.
So I would give a try at editing the XYZ.csproj by hand and add or replace what's listed as <TargetFrameworks> with netcoreapp2.0.
If you are adding it as additional target you need to separate them with ';' as in
<TargetFrameworks>net462;netstandard2.0;netcoreapp2.0</TargetFrameworks>
More details about this in this Microsoft doc.
Please keep in mind that this will trigger multiple compilations and will slow your build consequently...
It should be. Microsoft announced a ".NET Framework Compatibility Mode" with the release of .NET Standard 2.0. However, they didn't go into great detail about how it works exactly, or what to troubleshoot if it doesn't. Additionally, they only specific talk about it in relationship to Nuget packages, so it's possible there's some role Nuget is playing in the process, as well. Unfortunately, I've been unable to find any additional information about this feature outside of the announcement post.
That said, Microsoft's explicit recommendation is to not rely on the fact that your .NET Framework library may just happen to work in .NET Core; instead, you should be actively porting .NET Framework libraries you control to .NET Standard. I'd say you're likely going to spend more time trying to figure out why it doesn't "just work" than you would porting your code, so that it will definitely work, and be future-proof to boot.
The following solution worked for me.
Deleted bin and obj folders from all the projects in the solution, rebuild and if it still doesn't work try changing browser from debug options. for eg. If you already have chrome as default browser in Visual studio, switch to Edge or Firefox.
I'm compiling ASP.NET code for the first time ever and I'm stumped.
I downloaded MINGW-Get and just finished installing it. The client gave me the source code and I found a file called RSConfig.exe.
So I assumed that was the config file, ran it, and then tried "make" but got the error
No targets specified and no makefile found. Stop
Any idea what I'm supposed to do? I don't see anything that would resemble a makefile in the source code.
Thanks in advance!
Do yourself a favour and install Visual Studio Express:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
It makes development easier and fast
It sounds like you might want to get familiar with the background concepts around asp.net and it's defacto development environment Visual Studio (there are many versions of visual studio).
As Andrei recommends, using Visual Studio Express is a good free way of getting started. The version most suited for web development is Visual Web Developer Express.
Attempting to compile .net code from a toolset such as MinGW isn't a typical route for using asp.net, however I've not used MinGW before and not sure it's possible to compile .net code from it.... Although it is perfectly possible to compile .net code from the command line (using the .net framework sdk) , I certainly wouldn't recommend it if you are getting started.
I'm going to make a guess that it is an ASP.net web forms project, it being the most prolific asp.net project type at the moment.
This official asp.net site http://www.asp.net/web-forms will guide you through what web forms are and how to get the development environment setup. Having this sort of background will aid you in solving your particular situation.
what is the stack for a asp.net Web forms application?and why?
example for ASP.NET MVC there is an example:
http://codeclimber.net.nz/archive/2009/10/15/my-asp.net-mvc-stack-and-why-i-chosen-it.aspx
thanks
To be perfectly honest, this depends a lot on the specific project you plan to build with WebForms. Since I'm newer to MVC, I do just about all of my .NET development with WebForms. So here's the "stack" (framework + tools + components) that I use when building an application:
Framework
Obviously, ASP.NET WebForms. I make sure to keep all of my different layers (presentation layer - aspx webform, business logic - aspx.vb/aspx.cs codebehind, data access layer - additional classes) separate while I'm building.
Tools
Visual Studio 2010 - I dare you to find a better tool for developing a .NET-based web application.
SQL Management Studio Express - Fantastic tool for managing your database setup
TortoiseSVN - Subversion tool that integrates directly into Windows' contextual file menus. It's great for quickly committing/reverting projects!
BugTracker.NET - Great bug tracking tool that integrates with TortoiseSVN.
Libraries
jQuery - I use this for everything
jQuery UI - Great for adding "squishy" user interface elements and building out more interactive web forms
Flexigrid - I use this for building datagrid elements on my sites. Since it's built with jQuery, it interfaces nicely and handles AJAX data loads remarkably well.
YUI - Another JavaScript library that's great for animations and transitions.
Testing
Visual Studio Debugger - fantastic for stepping through server-side code to make sure things are working
Firebug - Firefox extension - Absolutely essential for debugging client-side scripts and for identifying HTML/CSS errors
IETester - Useful for anyone supporting commercial clients (who might still be using IE6)
For deployment, I use a set of custom tools that create unique filenames for frequently changed files that will need to bypass a user's cache when they're changed - i.e. whenever a CSS or JS file is updated or I change an image, I'll append a unique string to the end of the filename so the browser re-fetches the file.
The stack we have where I work:
Visual Studio 2008 / SQL Server Management Studio Express 2005
Resharper - for helping with coding standards and practices
Subversion - for source control (Formerly had SourceSafe which I had used for years but Subversion is much much better IMO)
Cruise Control .Net - for continuous integration
nUnit/nAnt - for unit tests and automated builds
IIS 5.1 - The downside of still being on XP is that we have these old tools at times.
IIS Admin .Net 1.1 - For helping have multiple sites on one machine.
WatiN - for web-based tests when needed.
In terms of coding add-ons:
jQuery
Sitecore (This is our CMS and is huge in some ways)
Browsers, just to note the big ones here:
IE
Firefox
Chrome
Safari
Tools:
Dev environment -
Visual Studio 2010 Professional - quite an obvious choice given that the latest tool is a big improvement over 2008 edition, especially in terms of performance. There are a few quirks still (waiting for SP1!) but it is mostly a pleasant and productive experience.
SQL Management Studio Express - for DB management
Source control and Project Management - Team Foundation Server 2010 - really going all out with MS here, leveraging our Bizspark membership, TFS 2010 has cool new features including branching/merging, shelfing (vs checking in) and much better transactional integrity than VSS. Also the project management tools are pretty good - there are various templates you can choose depending on whether you want to go Agile, or traditional.
Mantis - for bug tracking, but we are phasing this out and trying to move to TFS. Figuring out how to migrate existing data though.
Libraries:
Asp.net Ajax - pretty cool for what we need, simple ajax effects are quite easy to achieve.
Testing:
MS Test - in built in Visual studio, much better than previous releases - Unit testing support is far better.
Debugging:
Visual Studio Debugger
IE Developer tools