question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need to convert to web application before converting website project

See original GitHub issue

Steps to reproduce

  1. In Visual Studio 2019 open up a Web Application project that contains VB code.
  2. Run the “Convert to C#” command
  3. See error

Error message shown

#error Cannot convert ClassBlockSyntax - see comment for details /* Cannot convert ClassBlockSyntax, CONVERSION ERROR: Object reference not set to an instance of an object. in ‘Partial Class index_createM…’ at character 206 at ICSharpCode.CodeConverter.CSharp.HandledEventsAnalyzer.CreateEventContainer(EventContainerSyntax p, SemanticModel semanticModel) at ICSharpCode.CodeConverter.CSharp.HandledEventsAnalyzer.<>c__DisplayClass11_0.<HandledEvent>b__2(MethodStatementSyntax _, HandlesClauseItemSyntax e) at System.Linq.Enumerable.<SelectManyIterator>d__233.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__172.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()

Details

  • Product in use: VS Extension
  • Version in use: 9.1.1.0

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ortrailscommented, Jan 11, 2023

Yes, that’d be an interesting approach. Kind of a conversion only assembly.

On Wed, Jan 11, 2023 at 3:43 AM Graham @.***> wrote:

[image: Boxbe] https://www.boxbe.com/overview This message is eligible for Automatic Cleanup! @.***) Add cleanup rule https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Fkey%3DHcpPaJeqAoaujRmiUaWLIV3HBolvq%252FKh37LJu2%252B3Jsg%253D%26token%3DHW40CBcgKLjxaRpxxz6ckMLQjjL2fKP7NQ9ta2%252FnmZlpG7Nc93HpO99QDcyNLkMQleB3hW9Zn3db6FFd4fIef0TDQK0i%252BbekFGrecVNuPe4uIn48C%252F8R9tV1ccj4Vdk2pN%252FqoPZoG7rQdVR3KhNOLg%253D%253D&tc_serial=58541924214&tc_rand=1042165018&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001& | More info http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=58541924214&tc_rand=1042165018&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001&

Ah yes, I see, does the converter even provide a convert project option or are you trying to do a file at a time? If there’s no convert project option, nearby files aren’t taken into consideration. If that’s the case, getting the files all into some kind of vbproj is the trick. They don’t need to run in that form, but compiling (or the closer the better) allows the converter to grab the compilation model from the project. So just creating a library style vbproj with the appropriate references may be the thing to do

— Reply to this email directly, view it on GitHub https://github.com/icsharpcode/CodeConverter/issues/977#issuecomment-1378552824, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPFMUIUYISAKOYVYZJUEMDWR2E5JANCNFSM6AAAAAATTOU2XY . You are receiving this because you authored the thread.Message ID: @.***>

1reaction
ortrailscommented, Jan 9, 2023

Sure, this is a sample file. It’s from an old school ASP.NET Website project. createMap.aspx.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converting a Web Site Project to a Web Application Project
This posting explains how to convert an existing Web Site Project to a Web Application Project in Visual Studio 2010.
Read more >
Converting a Web Site Project to a Web Application ...
Open the existing solution. In the File menu, click Open Web Site, and then click Web Site. The Open Web Site dialog box...
Read more >
How to convert ASP.NET website to ASP.NET web ...
Right click the project solution explorer and select Convert to Web Application. There are quite a few small differences, such as the App_Code ......
Read more >
How to Convert Web Site To Web Application
How to Convert Web Site To Web Application · Create a branch from the team project your WSP located in. · Create a...
Read more >
How to convert a web application to Software-as-a-Service
The other way is to transform an existing web application into a SaaS platform. This article takes a look at the second way....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found