开发者

Implicit line continuation issue in VS2010

As most of you know, .Net framework 4.0/Visual Studio 2010 supports implicit line continuation in VB, which was not available in previous versions (at least not to my knowledge).

I have a situation where I am working on an ASP.Net 3.5 application that is targeting a machine that does not currently have .Net 4.0 installed and from what I understand it won't be installed for some time yet on that machine. Obviously, my development machine does have .net 4.0 installed.

With the implicit line continuation feature in VS2010, I sometimes find myself forgetting to add the continuation, and VS2010 does not have an issue with that even when I am targeting a previous version. Additionally, I know that if I actually compile the code (business objects and such), issues with line continuation are not a problem, as the compiled dll works fine as a 3.5 .net file.

My concern is this. There are areas where I am doing VB.Net coding in the code behind(beside?开发者_如何学编程) for the asp.net pages. These would only be compiled on the server when they are first used, but since the server doesn't have the .net 4.0 framework (or even if it did), does anyone know if this would this cause the compilation to fail if I missed a line continuation? If so, is there a way to enforce using line continuation characters in VS2010?

I realize that some best practices might not be getting followed here, but I'm not about to change all the development dynamics around here just yet. Also, I'm not in an environment where I could easily test this out on my own.

Any help would be appreciated.


If the codebehind is being deployed to your server, you are using a web site project, I would investigate using a web application project instead.

As for your question, the obvious solution isto use vs 2008. 2010 proboably isn't getting you a lot under the circumstances, and there is no option to turn it off:

http://connect.microsoft.com/VisualStudio/feedback/details/583528/implicit-line-continuation-option

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜