Cannot process 'reportname.rdlc' because it is not an EDMX file - c#

I've inherited a C# app which uses an .rdlc file. I get an error (not a warning) in my error list:
Cannot process 'reportTerminalStatus.rdlc' because it is not an EDMX
file.
but unlike normal code compilation errors it doesn't prevent the production of an executable file. I don't want to ignore it, but is it safe too?
I've googled for information about the specific problem, but I'm not coming up with anything. I'm using VS2010 Ultimate on Windows 2008 server, and I've just run Windows Update so I have to assume I'm fully up to date. Am I missing a component? I've tried it on a VS2008 machine with the same results.

This sometimes happens when build action is wrong for a file. In Visual Studio check properties for rdl. It might be set to EntityDeploy which is wrong.

according to
http://www.experts-exchange.com/Programming/Languages/.NET/Web_Services/Q_25956424.html
It has something to do with naming clash - specifically - you may have an entity (as in entity framework Entity) called
reportTerminalStatus
in the project, sharing the same path as the rdlc report.
Does changing the report name change anything ?

Related

How to run the code generated by Altova Mapforce in Visual Studio?

I am using MapForce for the first time. I was able to successfully create an XML mapping. However, I am not sure how to run the generated code in Visual Studio, so that I can use it and see the output. I generated the code for the mapping in C# and did try to run the "Mapping" Project in VS.
Unfortunately, I am not able to due to few errors. There isn't a good documentation on the folders that are created in the project. If I can get a documentation link that I can refer to or if somebody can define why those folders are there and how can I use them/ how I should be running those projects.
Please correct me if I am wrong anywhere.
If you generated code to C:\MyFolder\, then you need to open in Visual Studio the solution C:\MyFolder\Mapping\Mapping.sln. Note that the "Mapping" is the default name, if you configured it to be something else from MapForce settings, then it may be different.
Solutions in other generated folders are supporting libraries, and you should never edit them (or at least do so at your own risk). The only file you can (but you don't normally need to) modify is called MappingConsole.cs. For example, you may want to change the paths of the mapping input/output files. In any case, after you build and run the solution, a Mapping.exe application is created in the Bin\Debug folder.
It would have been helpful if you indicated which errors you get. Perhaps the paths to the mapping input files cannot be resolved relative to the Mapping.exe application?

C# visual studio - Properties.Settings.Default.SomeValueOrAnother has me baffled

C# visual studio project: Properties.Settings.Default.SomeValueOrAnother has me baffled.
I have a relatively simple project. It saves a bunch of last-entered values between sessions, and restores them on next invocation. Was working fine. I changed a control so that the minimum allowed value was no longer 1, but was now 100. Last used value had been 3. On startup, it now complains that 3 is not a valid value.
Well, duh, of course – but hear the rest.
I have edited Settings in VS to default to 500. I have edited the exename.config file to contain 500 instead of 3. I have examined every possible config file (vshost.exe.config, the files in bin/debug, bin/release, obj/debug, obj/release. They all contain value=500. I have re-built repeatedly. I have copied just the exe and the config file to a separate PC, so that the development environment was not a factor. I still get this error message.
To further confuse me, on the dev PC, if I run (directly, not in the debugger) the exe in /obj/debug or /obj/release I do NOT get the error. If I run the ones under /bin I DO get the error. The config files have identical contents. If I copy the exe & config from /obj (the one that does not give an error on the dev PC) to another PC, I DO get the error.
I thought exename.config was all I had to deal with, but it looks like VS is doing something behind my back – at least something that I cannot find in the documentation. I imagine this is something trivial. If anyone can explain what I've missed I'd sure appreciate it. All I really want to do is reliably save some user settings from one run of the program to the next. And get this app to 'forget' that obsolete value.
TIA
Mickey
Look for *.settings files in your solution. That's where the value that's used when you build your project will be stored .
This was not the entire answer, but it did explain where the mystery values were being stored:
"This might help to some people dealing with Settings.settings and App.config: Watch out for GenerateDefaultValueInCode attribute in the Properties pane while editing any of the values in the Settings.settings grid in Visual Studio (VS2008 in my case). If you set GenerateDefaultValueInCode to True (True is the default here!), the default value is compiled into the exe (or dll), you can find it embeded in the file when you open it in a plain text editor. I was working on a console application and if I had defaults in the exe, the application always ignored the config file place in the same directory! Quite a nightmare and no information about this on the whole internet."
...in another post here. I am now individually testing values read from settings, rather than trusting it, and forcing them into valid range if required.
Truly an ugly, and well hidden, default. I haven't embedded data values in my executables since the days of CPM. Jeesh.
Thanks again, Microsoft.

Error in Properties of .net Project & Designer file is locked

Designer file is locked and when go to project properties it gives this error.
An error occurred trying to load the project properties window. Close the window and try again. The CurrentContext property of the LicenseManager is currently locked and cannot be changed.
.net framework 3.5
VS 2008
Just a random suggestion:
Close VS, then try deleting any .suo or .csproj.user files. These store per user settings like which files you have open etc, and can sometimes get corrupted. (maybe back them up first just in case)
See following
http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/b3bf3b31-85ac-4073-be2b-2f061b240e63
Some of the resources that you use in your project are compiled with different versions of
the .net framework.
Right click on your project, choose properties and change Target framework to the framework
that the resources are compiled with, or remove those resources and continue.
I agree with Simon.. I was getting this error and could not resolve this.. I removed all unused references from mysoftware properties under project menu and then i removed the unused data base. it resolved my problem. i m sure it will work for you.
Sometimes some corrupted files causes this problem although you never applied and sort of licensing to your software.
njoy..
SandeepV
Adobe Certified Expert
Microsoft Certified IT Professional
This occurs when the designer codes hits a while true Application.DoEvents infinite loop in a button/dropdown/control constructor.
You can see VS.net taking up one cpu core completely and you can debug this pretty easily with another Visual Studio instance.
If you get this error on opening a form design ( not the xml type), you can close the form, open project property, select build tab, click on .net framework version and you can choose the same version again,
close the project property, open th eform again. that's how I got rid of the error,
closing visual studio and re-opening the project did not help me

Any way to make Intellisense work, when opening a cs file that's not part of the project?

What we ideally need is, to know how Microsoft handles XAML generated code (Those *.g.cs files). If you goto a XAML code behind, intellisense will work even if the *.g.cs file is not part of the project!!
Context:
In a custom VS package, we need to have some logic to open a CS file (with out making it a part of the project) in the VS IDE, to allow the user to edit it.
We are hooking up the document to the Running document table and receiving the events like Saving, Close and all, using IVSRunningDocumentTable. Works good.
Now the problem is, when the document is opened, Intellisense can't work, for the simple reason that the opened document is not part of the project (sadly, we can't do that, we can't make it code behind).
Intellisense is driven by a memory cache of identifiers and types. These types are cached based on the project you are in and the references that project has. If the code file you are editing is not part of a project, Visual Studio would have to load every possible assembly and create intellisense data for each type in the entire .NET framework because it would have no way of knowing whether or not your code file required it.
I guess Visual Studio could load intellisense based on the content of the file but that is not the way it currently works.
Visual Assist X by Whole Tomato is an addin to VS I've been using for many years. It will give you Intellisense and more when you open it.

ISS error CS0433: name collision

In our application we've run into an error numerous times where we get error CS0433, which complains about a name collison in two separate dlls. This is an ASP.NET app developed in C# using webforms. It always complained about A TimeLog page. Anyone have advice for resolving this error?
I found a link in the MSDN that describes this error.
To summarize, a naming conflict can happen between the file name of a page (TimeLogTab.aspx) and the class in the code behind (public class TimeLogTab).
The link recommends renaming one of them. I changed my class to Time_LogTab and the error went away.
The error can happen intermittently: I'm using "Publish Web Site" for a VS 2005 Web Application Project with "Delete all existing files prior to publish" and then XCOPY-Deploy to the target IIS folder (which won't delete existing files there). Today I ran into that error for the first time (no new .ascx/.aspx files since weeks), but simply recompiling and redeploying the same project solved the problem.
The only difference: For the 2nd time, I hit the page causing the problem first. Now I'm wondering whether the exact click order really matters or rather whether an arbitrary unlucky click order effectively can crash an ASP.NET site?

Categories