How to fix problem with Designer.cs file? - c#

Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'DbContextAttribute' could not be found (are you missing a using directive or an assembly reference?) Hotel C:\Users\Adis\source\repos\webapp\Hotel\Hotel\Migrations\20200625154358_firstOne.Designer.cs 12 Active
I have problem with designer.cs file, some files are deleted from my device, after that i can't build my project. Anyone have idea what to do ? Thanks.

Try uninstalling (if installed) EntityFramework and re-installing. Failing that, please post what references you currently have.

Related

What Nuget Package do I need for WinApplication.GetSecurityStrategy().RegisterXPOAdapterProviders();?

I created a new Winforms Xaf Xpo standard security project with 21.2/5
Then I changed the framework of each project to be 4.7.2
Then I ran the upgrade wizard.
Then I tried to convert the project files to use Nuget with Package References.
However I get the following build errors
Severity Code Description Project File Line Suppression State
Error CS1061 'SecurityStrategy' does not contain a definition for 'RegisterXPOAdapterProviders' and no accessible extension method 'RegisterXPOAdapterProviders' accepting a first argument of type 'SecurityStrategy' could be found (are you missing a using directive or an assembly reference?) DXXpo.Win C:\Users\kirst\source\repos\DXXpo\DXXpo.Win\Program.cs 33 Active
Error CS0246 The type or namespace name 'SecuredObjectSpaceProvider' could not be found (are you missing a using directive or an assembly reference?) DXXpo.Win C:\Users\kirst\source\repos\DXXpo\DXXpo.Win\WinApplication.cs 20 Active
I tried drilling into another new project and I can see that RegisterXPOAdapterProviders has namespace DevExpress.ExpressApp.Security
I already have that installed as a NugetPackage.
I tried installing DevExpress.ExpressApp.Security.Xpo but I get a message
Severity Code Description Project File Line Suppression State
Error NU1101 Unable to find package DevExpress.ExpressApp.Persistent.Base. No packages exist with this id in source(s): DevExpressMy, nuget.org, SBDCommonFeed#Local DXXpo.Win C:\Users\kirst\source\repos\DXXpo\DXXpo.Win\DXXpo.Win.csproj 1
There are no packages starting with DevExpress.ExpressApp.Persistent in the feed.
The docs are here
This question is possibly related.
I managed to resolve this issue by including the package DevExpress.ExpressApp.Security.Xpo

SPDataSource + Missing reference in SharePoint 2013 project

I have a project built in SharePoint 2013. I have a SPDataSource as Base class in my project. I have a reference to the Microsoft.SharePoint.dll file but still this SPDataSource and SPDataSourceView are giving me error.
Missing Namespace error
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'SPDataSource' could not be found (are you missing a using directive or an assembly reference?)
Can anybody tell me why is this?
Thanks in advance
Create a new project from inside visual studio from the Templates -> Office/SharePoint -> SharePoint 2013 Empty project.
From there compare the references between that and your project.

Entity Framework 5.0 with vs 13

There is an issue with my visual studio. When i try to generate the edmx file it does all the process very well. But as soon as i try to build the solution it throws so many errors. I am not sure if this issue is with visual studio orentity framework.
Please check the image i have attached, and the errors as well.
Here are the errors..
Error 7 A using namespace directive can only be applied to namespaces;
'System' is a type not a namespace
Error 73 The type or namespace name 'DbContext' could not be found
(are you missing a using directive or an assembly reference?)
There are so many errors.
Please help
Try to clean contents of ".vs" folder in the root of solution

unavailable project - The type or namespace name could not be found on multiple solution

I'm having some errors on multiple projects under my solution.
CS0246 C# The type or namespace name could not be found (are you missing a using directive or an assembly reference?)
The projects are labeled as (unavailable)
This is labeled as incompatible before though not so sure why its changed status but same errors. Tried to Clean/build and rebuild the solution but the error still the same.
Also I tried the target framework but not so sure on how to do that thing.
Another solution I tried is the add reference but can't figure out what reference to add.
Im not so sure if I'm missing some updates or what so. Tried to install fix/azure and the visual studio 2015 updates.
output error:
Line 67: {
Line 68: if (_traceWriter == null) InitWriter();
Line 69: lock (_traceWriter)
Line 70: {
Line 71: // If the date has changed, close the current stream and create a new file for today's date
error list.
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name '***' does not exist in the namespace '***' (are you missing an assembly reference?)
other error description
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name '***' could not be found (are you missing a using directive or an assembly reference?)
Severity Code Description Project File Line Suppression State
Error CS0103 The name '***' does not exist in the current context
output from general upon load of solution w/ building the solution
Deserializing the project state for project 'database.sqlproj'...
Detecting file changes for project 'database.sqlproj'...
Deserialization has been completed for project 'database.sqlproj'.
UpgradeLog here have some error on the .wixproj though I install the latest wix driver not sure if I need to setup anything else other than that.

I'm getting error "The type or namespace name 'CS' could not be found in the global namespace (are you missing an assembly reference?)"

I'm using component for cropping images. If I added to website it works fine. When I add it to web application project, I'm not able to compile it, getting the error below. Dll in bin folder, and I added reference to this DLL
Error 21 The type or namespace name 'CS' could not be found in the global namespace (are you missing an assembly reference?) E:\Site\CropImagePage.aspx.designer.cs 148 27 SiteName
Any idea what the reason why it's not compiling?
This error is occurring right now in your .designer.cs. I suspect you've got an out of date .designer.
delete your CropImagePage.aspx.designer.cs . Don't worry, we'll get it back.
build/run your site; this could eliminate the error.
if you want it back, right click on CropImagePage.aspx, and select command 'Convert To Web Application'. This will recreate the .designer.cs.

Categories

Resources