Migrate old VB.NET project from VS2013 to VS2017 - asp.net

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.

Related

Can't run a cshtml file

This is my first time ever i encountered with cshtml extension, and asp.net.
What have i done so far..
I installed Visual Studio Community 2017 with
.NET desktop development
ASP.NET and web development
.NET Core cross-platform development
The code, that i need to modify is in cshtml extension. When i try to run it,
ctrl+shift+w all i get is
I don't have anyone to ask, and you people are my last option

Is it necessary to manually add <AutoGenerateBindingRedirect> metadata to the Core project file to correctly reference assemblies?

I'm using Visual Studio 2013 and MvvmCross to create an Android application using Portable Class Libraries.
I notice in my first view model, CatalogViewModel, some code is highlighted as not referencing the correct assemblies or unable to be resolved (the code builds fine even with these issues).
Examining the .NET Portable Subset assembly in the Object Browser shows various System assemblies included (2.0.5.0 v2.0.50727 & v4.0.30319, 4.0.0.0, 5.0.5.0). Automatic binding redirection for assemblies in .NET Framework 4.5.1 can be enabled or disabled by adding this line to the .csproj file.
<AutoGenerateBindingRedirect>true</AutoGenerateBindingRedirect>
or
<AutoGenerateBindingRedirect>false</AutoGenerateBindingRedirect>
This seems to solve the referencing and redirection issues in the IDE. I haven't found any information about this manual modification to the Core project file in any of the MvvmCross info online I reviewed so I wanted to post a question here to see if anyone had some information or best practices.
No, you shouldn't need AutoGenerateBindingRedirect. This feature is intended to generate binding redirects for non-platform assemblies, such as NuGet packages. Platform assemblies should be unified automatically by Visual Studio / MSBuild.
Which seems to work, since you pointed out:
the code builds fine even with these issues
So this looks like a bug in ReSharper. The fact that adding AutoGenerateBindingRedirect fixes your ReSharper issues might be a side effect of something else.

why other project reference is not showing in namespace

I have three projects in one solution (ASP.NET)
ECL.BIZ.LOGIN
ECL.MODEL.LOGIN
ECL.UI
When I added a reference to other projects in ECL.UI project, namespace is not available in using keyword. My all projects are set to .NET Framework 4 (not ClientProfile).
Why is this happening?
Note: It was working earlier smoothly, it is happening since I deleted ECL.UI project and recreate it again. After then, I still can not find namespace of other projects.
I am using Visual Studio 2012
The answer of my question is:
We have to switch between target frameworks. As I am using Visual Studio 2012, I switched my target framework to .NET 4.5 for all projects and add the reference for required projects and switch back to .NET 4 again for all projects at same time. Then it works absolutely fine as I expected.
Note: I don't know why it is not working while all other projects are set to same framework even after recreating one of the project. However the above trick worked for me. If anyone having this weird problem after deleting one of their project and recreating it again, you can try the above on your own. Thanks to all

Compiling ASP.NET

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.

If I build a web application in ASP.NET, am I married to Visual Studio?

Doesn't Visual Studio generate all kinds of things when you build asp.net websites? I haven't used it in a while but back in webforms with a the dal and a bll, VS generated xml files and other things (don't remember what). And, while I technically could use notepad to fix it, VS seemed to be the only way to make sure things worked right.
How about today with MVC or something else asp.net? Am I tied to Visual Studio forever if I want to build websites? I liked in PHP that I can open up a file and it be simple to change things and it just works.
I am not knocking Visual Studio. It is a great product, but for those in my group that do not use it, it is a learning curve. Not asking for why asp.net is better than php or vice versa, just about visual studio.
EDIT: Is Visual Studio the BEST way to build asp.net projects?
You can use MonoDevelop, Webmatrix, Visual Studio Express but i suggest SharpDevelop, its open source.
sharpDevelop (short for SharpDevelop) is a free IDE for C#, VB.NET and Boo projects on Microsoft's .NET platform. It is open-source, and you can download both sourcecode and executables from this site. In addition, you can find the latest information and changes on #develop, as well as get in touch with the team in the forum.
More Information
SharpDevelop Website
MonoDevelop
Webmatrix
Visual Studio Express
No, you can build with MSBuild from command line, just simple msbuild.exe app.sln
You can also use MonoDevelop, which will run on Windows/Mac/Linux.
You could use Microsoft WebMatrix, which is free and aims to simplify the web development process. Another alternative is MonoDevelop, which is an open source IDE for multiple platforms.

Resources