I have an ASP.Net project that I converted to C# from VB using InstantC#. The conversion appears to have happened pretty well. Only a few items had to be fixed manually. I did this after converting the project from VS2010 to VS2012. Once I fixed the inferred method and object references, I was able to build once.
Upon viewing the page, I received an Object Null Reference Exception on an event handler assignment.
I built again. This time, I received all kinds of errors from the methods and properties for code that referred to other user controls that the page has on it. In looking at the designer file, it is not correctly determining and assigning the types to the controls.
I have tried manually changing the object types, but Visual Studio changes them back.
I have also tried deleting the designer file and choosing Convert to Web Application.
There are other user controls in the same project that work fine. No issues. Any other ideas on how to fix this?
I finally fixed this by creating a brand new user control, and then pasting the UI from the original user control. Once I confirmed the designer file was generated correctly, I imported the code behind from the original user control.
To be sure everything went as planned, I renamed and excluded the original user control from the project and tested the new one. When I confirmed that things were working, I deleted the original.
Related
This is a strange one, and is related to the Delphi IDE environment, but I'm hoping someone has some insight, cos I'm at a loss.
Basically, the problem is that I'm now in a situation where any project I create that uses a TChart with a TBarSeries gives me the "Class TBarServices not found" error when I re-open it from a fresh start of the IDE.
As an example, currently if I do the following:
Create a new VCL forms application,
add a TChart component to the form,
edit the chart through the designer and add a Series, choosing Bar as the type.
Build the project,
run it, everything is fine.
Close the IDE and restart it.
Open the previously saved project. Immediately get the Error Reading Form message about Class TBarSeries not found.
But if I then:
Close the broken project without saving, and leave the IDE running.
Create a new VCL form with or without a project,
add the TChart and bar Series to the form,
close the form/application without saving.
Reopen the previously saved project that threw the error. No error any more.
Creating a new TForm with a TChart and TBarSeries is changing the Delphi IDE in some way that is not persistent, so that the next time the IDE is started, those projects no longer load properly.
I have included VCLTee in the Unit Scope Names, but the Enterprise version of Delphi 10.2 does not include the source for these components, so there are no additional paths I can add to the Library Path.
Once I have created a new form and set up the chart, everything is fine with any project that uses the TBarSeries so long as I don't close the IDE, so that's the workaround I currently employ.
Do you use DevExpress?
I had the same problem when DevExpress Printing System for DBTeeChart was installed.
Probably DevExpress uses old version of TeeChart different than this installed by you.
I just disabled this DevExpress Printing System and now it's OK.
When I try to open any activity in design mode designer fails with message "The document contains errors that must be fixed before the designer can be loaded. Reload the designer after you have fixed the errors". The project builds and runs fine though. This happens even with a fresh newly created solution. I mean that if I create a new workflow project and add a new item -> activity the problem persists.
If I click "Reload the designer" I get the following error: "Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'System' that is not included in the assembly". If I build the project the error disappears but the designer doesn't start working.
I'm using VS2010 Premium. The only plugin installed is ReSharper. However I tried removing it but it didn't solve the problem. I've also asked a friend of mine to reproduce the same error on his computer but everything worked well.
The problem was that there are several types of editor for .xaml files. If you right click open with you can choose one of them. In my case WPF designer was selected by default though it's better to choose automatic selection.
Hope this information will be helpful for someone else :)
I have a web project running in Visual Studio 2010 and target .Net framework 4. When I 'Build' the solution it will tell me the build was successful even though there are (known) errors in the code. If I open a page that has an error, the compiler will then pick up on the error and underline it in blue instead of red.
Is there a setting that would drive this kind of behavior? Any ideas on how to fix?
If you have multiple projects in your solution it is possible that one of them is not set to build. In your build output window did you see the name of the web project you are having issues with?
Also, check the build configuration manager to make sure you have it set.
If it's an MVC app, the view files (*.as{p,c}x) will not be compiled unless you explicitly enable it by passing /p:MvcBuildViews=true or enabling that flag in the project file for a given configuration.
I'm having similar (if not identical) problems with compiling an ASP.net 4.0 WebForm. I have a page that is a copy of an existing page in terms of markup, but the code-behind has not been created. As an example, the markup has an ASP:Button with a click event, but the event handler has not been declared in the codebehind yet. When I do a full Build/Rebuild/Clean etc., no errors are found. I open the page, and a compiler error is thrown. As far as I know I haven't made any changes to settings anywhere, just started doing this recently. Additionally, it appears that my break points aren't being caught anymore either. I'm not sure if the two are related, but they did start happening around the same time.
Greetings!
I am going through Brad Abrams' SL4 + RIA Services series. Right now I am here:
http://blogs.msdn.com/brada/archive/2010/03/15/silverlight-4-ria-services-ready-for-business-exposing-data-from-entity-framework.aspx.
When I get to the "add domain service" step and the wizard asks you what entities you want to expose, the list is empty. The dropdown that let's me choose my Entity data context is there and the "DishViewEntities" is selected but it is not showing the "Restaurant" and "Plate" entities in the list below like it does in the picture.
I found this thread here:
http://forums.silverlight.net/forums/t/168724.aspx.
The poster has the same problem as me. I have restarted VS, rebooted, regenerated the EDMX, tried creating it in different folders. Still the list is empty. When it is empty, it will not allow me to select individual entities or generate the class.
Any ideas from the community? Thanks!
I had the same problem. I looked for answers on web, they all seemed to relate to installing the RiaServicesToolkit, or other packages, or the dbml confirguration string. But I noticed that when I was opening my Linq2Sql (dbml) in visual studio that I was getting a message about the configuration string missing or incorrect.
It turns out that the configuration string problem was the result of my SQL Server Agent being set to Manual instead of Automatic in my Services (Control Panel). Once I corrected this, the configurations string problem went away.
I don't know if that is also what was causing my RIA (Linq2SQL) problem (although I do see how it could), but after fixing this, and cleaning & rebuilding the solution, my Linq2SQL context appeared on the drop down list of the DomainService wizard and all was golden.
Hope this helps.
This happens from time to time in my project. I don't really have to create a new project (which would be very unfeasable.) I usually make sure the project builds (clean/rebuild) and right-click on edmx file and do run custom tool. And make sure that no errors are being reported on Error and/or Output windows.
We solved our problem. Sometimes EDMX designer can't map Entities and tables. Right click each entity and select table mapping then ensure if all of your entities are mapped correctly.
When you want to add Domain Service Class an exception occur but (I don't know why) the exception message doesn't display. Than the list is seen empty.
If all of your mappings and web.config settings are right after rebuild progress domain service class addition works fine!
Every few days VS2008 decides to get mad at me and fails to generate a designer file claiming it cannot find the file specified and that it's missing an assembly. Here's the scenario:
The aspx page has a reference to a custom user control (inheriting UserControl) which references another assembly in the backend. There are many other references to this "missing" assembly in other places in code which don't throw errors. rebuilding, updating the source to the clean copy, shouting at the computer, punching the screen, etc all fail to work.
Any suggestions? This is quite annoying.
We've had similar problems before, unfortunately I don't remember the exact solution.
If your using a "Web Site" project (no project file) then start by checking that both your page and your control both set the ClassName property in the first line of your aspx/ascx file and that you specify the full name of the class including the namespace.
Example:
<#Control Language="VB" AutoEventWireup="false"
ClassName="YourProjectName.YourUserControl"
Inherits="YourProjectName.YourUserControl"
CodeFile="YourUserControl.ascx.vb"
%>
Many times not setting all of these will still work but you will get odd compiler errors and behavior in VS.
If you using a Web Site Application project try deleting the designer file manually and then right click on your project and choose "Convert from Web Application." This will should recreate the designer file for you.
My only other suggestion would be to recreate the page and/or the user control from scratch.
Jared, you've hit it. Using "Convert to Web Application" to manually generate the designer file solves my problem. I'm glad you posted this before i started reinstalling. Thanks.
You might try archiving a template of a new file with its designer equivalent. If VS coughs then you can do an "Add Existing" option with the file you already have.
It seems, however, to be an issue with your installation of VS2008 so you might try reinstalling it.
I found that using a custom control, you would need to add a reference to the .dll. This fixed it for me after migrating from a web site to web app.