I am using Visual Studio 2013 express. I create a new project and then I add a database to that project. But, when I add an ADO.NET Entity Framework model to that project and then run the program, I get the following four build errors listed below. To try to remedy this myself, I added the namespaces 'System.Data.Entity' and 'System.Data.Entity.Design', but that didn't help. Also, I uninstalled and re-installed the Nuget package. I also uninstalled and re-installed Visual Studio 2013 Express for Windows Desktop. But these measures didn't help the situation either.
Please note that I used to use the Entity Data model just fine. But it was around the time that I did a system restore on my computer, and when I updated VS 2013 with an update offered on the start page, and finally, when I signed up for MS Azure, that I started running into the problem described above. Now I would think that uninstalling and reinstalling Visual Studio 2013, and then installing the 'Nuget' Package would solve all problems. What am I missing here?
The errors mentioned above are:
Error 1 The type or namespace name 'Infrastructure' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?) C:\Users\John\documents\visual studio 2013\Projects\Riches\Riches\RichesModel.Context.cs 14 30 DataLayer
Error 2 The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) C:\Users\John\documents\visual studio 2013\Projects\Riches\Riches\RichesModel.Context.cs 16 52 DataLayer
Error 3 The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?) C:\Users\John\documents\visual studio 2013\Projects\Riches\Riches\RichesModel.Context.cs 23 49 DataLayer
Error 4 The type or namespace name 'DbSet' could not be found (are you missing a using directive or an assembly reference?) C:\Users\John\documents\visual studio 2013\Projects\Riches\Riches\RichesModel.Context.cs 28 16 DataLayer
Thank you and I realize that my last attempt at this question was rather rough-draftish,
John
By opening 'Tools', 'Nuget Package Manager', 'Manage Nuget Package bySolution', then in 'Updates' uninstalling the check-boxes that show my dbase and its one table, and then, in the 'online' section, reinstalling with the purple-colored icon for the entity framework, then all of the references populated in the solution explorer for the EF and data extensions. And the compiler can find the library it needs to run. So the program runs fine now with the EF model added.
That other error window that you mentioned which was re: NuGet.VisualStudio.Interop I had gotten before I added Nuget at all. It was your pointing to adding Nuget to a particular solution that directed me to look in the 'Manage Nuget Package by Solution' item.
The evidence points to needing to install all of the updates manually, particularly from the Nuget Package Manager in addition to installing Visual Studio 2013 (Express). Say, for instance, if you have to restore your system to a point before you ran the update from your start screen. So in this case that you don't have access to that update from your start screen, you would now have to install VS 2013, then install Nuget from either 'tools' 'extensions and updates' or from 'tools' 'Nuget Package Manager', then install 'Entity Framework' from 'Manage Nuget Package by Solution'.
John
Install Entity Framework package by Package Manager Console. Open it (tools menu) and type:
Install-Package EntityFramework
Then let us know is it work now. (Entity Framework should be visible, when you expand References node in Solution Explorer)
Related
We are upadating the packages(packages are in package deployment model) from SSIS 2012 to SSIS 2017. There are lots of script components in all the packages. When we are upgrading the packages we are having an error
Description: CS0234 - The type or namespace name 'Dts' does not exist in the namespace 'Microsoft.SqlServer' (are you missing an assembly reference?), ScriptMain.cs, 14, 26 End Error
Configurations:
SQLserver 2017
Visual studio enterprise 2015 + SSDT 2015
We have tried different options of deleting and re-adding the assemble file in the script component. Looks like the Microsoft.Sqlserver.ManagedDts assemble file is having issues for 2017 version. When we upgrade the packages to SSIS 2016 the packages work fine.
When we try to run the SSIS 2016 packages from Sqlserver agent job in SQLSERVER 2017 it is trying to upgrade the packages to 2017 and throw up the similar error as above.
Any solutions would be appreciated.
We have a mix of straight SSIS and BIML generated packages all suffering the same issues. Again, struggling for answers
We did find a workaround, but it's far from ideal :
View code on the dtsx package
Find the Project node
Find the PropertyGroup node which contains the AssemblyName node
Add a TargetFrameworkVersion to this PropertyGroup, with a value of v4.5
Save
Now if you open the package you can build/Execute your package
I'd forgotten about this post, but just for some extra info Varigence supplied us with a pre-release of the next cut of the BIML language (around 2018-05-25) and our issues (at least the automated package build ones) had gone away
After creating a new WebApp (WebJob) in Visual Studio 2015, I recently ran into an error, when I tried to publish the WebApp as WebJob to Azure, using the WebJob Publisher in Visual Studio.
The output always displayed the Errors:
CS0234: The type or namespace name 'WebJobs' does not exist in the namespace 'Microsoft.Azure'
CS0246: The type or namespace name 'QueueTriggerAttribute' could not be found
CS0246: The type or namespace name 'QueueTrigger' could not be found
I tried reinstalling and referencing the most current NuGet Packages which didn't result in success.
Finally, I found out, that my issues were solved using the Packages Version:
Microsoft.Azure.WebJobs v2.0.0
And Microsoft.Azure.WebJobs.Core v2.0.0
instead of the most current versions 2.1.0 at this point.
Perhaps you have an Idea if there could be any other Issues with this? Anyway, if you run into the same problem, the solution above helped me, but didn't satisfy me.
I tried reinstalling and referencing the most current NuGet Packages which didn't result in success.
Perhaps you have an Idea if there could be any other Issues with this?
I think your issue is more related with Visual Studio Version.
If I run the web job in VS 2015, I get the same result as you. We could see the default .NET Framework version just 4.5.1. The packages all old version. And this platform can not load the latest package correctly. It is not like VS 2017, it can not support the latest feature.
If I run the web job in VS 2017, every thing works fine. And we could load the latest package in VS 2017 correctly. If you really want to use the latest feature, you could download VS 2017 from this link.
A consultant modified our project (asp.net core C#), in VS15, to add a call to a SSIS package.
We are getting errors compiling this code in VS17.
using System.Data.Sql;
using Microsoft.SqlServer.Management.IntegrationServices;
using static Microsoft.SqlServer.Management.IntegrationServices.PackageInfo;
var intSvc = new IntegrationServices(new System.Data.SqlClient.SqlConnection(Database.GetDbConnection().ConnectionString));
....
....
Errors
Error CS0234 The type or namespace name 'Sql' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
Error CS0234 The type or namespace name 'Management' does not exist in the namespace 'Microsoft.SqlServer' (are you missing an assembly reference?)
Error CS0246 The type or namespace name 'IntegrationServices' could not be found (are you missing a using directive or an assembly reference?)
....
....
Is Visual Studio 2017 simply incapable of supporting SSIS calls? Or do I simply need to find these libraries and create explicit references to them?
Seems there is no support for SSIS in VS 2017 until VS 2017 update 3 (15.3) according to this link(June 2017).
Support for Integration Services for Visual Studio 2017 is in
progress, but is not yet available on launch day. For now we recommend
using SSDT for VS2015 if you need to use all of the BI project types
together in a solution, but stay tuned to this blog for updates
on this.
According to this discussion there will be SSIS support in VS 2017 update 3 (15.3), which was released yesterday (15.08.2017). It will be shipped like separate .exe installer. Here is quote from this discussion:
SSIS heavily rely on COM, and we have dependencies on VSTA, old SSIS runtime (to support multiple target server version), so we need an exe installer (like SSDT for VS2015 installer) to bundle everything. Our installer can be found in SSDT download page soon. I will let all of you know once it is released. Currently we are targeting this week or early next week, as long as everything goes well.
Have you tried to re-add references to those asemblies? Right-click on the Reference inside your project, click Add Reference and re-add all those assembies that are missing.
Symptoms
I've been attempting to fix my Xamarin forms solution in Visual Studio 2017 RC1 that was generated as a brand new template. While both the android and iOS sub solutions have all their .dll references properly referenced, my UWP (Universal Windows) sub solution seems to be missing essential references to the following .dll files:
'System'
'Xamarin'
'Application'
'Linq'
I was able to locate the .dll references for 'System' and 'System.Linq', in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework, but I'm having trouble locating the specific 'Xamarin' reference for UWP (Windows). I am fairly certain finding the 'Xamarin' reference will also resolve the 'Application' reference as I believe it is a derivative of 'Xamarin'.
Attempted fixes
1. Clean solution
Result: Clean immediately cancels, errors regenerate
2. Create new solution
Result: No change
3. Reinstall Visual Studio 2017 (Several times) and then create new solution
Result: No Change
Specific Error(s)
CS0246 The type or namespace name '-insert reference here-' could not be found (are you missing a using directive or an assembly reference?)
This is happening in project platform -solution name-.UWP in the App.xaml.cs file.
I had the same problem. Unloaded and reloaded the UWP project and suddenly all my lost nuget references appeared (Xamarin.Forms, Microsoft.NETCore.UniversalWindowsPlatform, sqlite-net-pcl, ...)
Turns out the Nuget package needed to be updated.
To do this, use the "Solution Explorer" Window, right click references -> Manage NuGet Packages. A new window will pop up allowing you to update and install NuGet packages.
Alternatively, you can navigate to the Package Manager with Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution.
You can also use the package manager console and use the command: Update-Package to update all packages.
I've got a Problem with Visual Studio 2010 and the Newtonsoft.Json library.
A few hours ago nothing was wrong with my project, but now it throws this error
The type or namespace name 'NewtonSoft "could not be found. (Missing a using directive or an assembly reference?)
--I just saw that the Reference was deleted and i can't re-add the NewtonSoft.Json library.
You can use the package manager console to remove the package, if you're having trouble getting NuGet to uninstall or reinstall it using the GUI:
Uninstall-Package Newtonsoft.Json
Be sure you've selected the right target project from the dropdown at the top of the console if your solution contains several projects.
Make sure that the .NET framework version your project targets is the same or higher than the one your Json.NET nuget package requires.