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.
Related
I had a Microsoft WebForms report viewer library version 10 referenced in my project, and I decided to remove that reference and add the version 150 NuGet package. However now I get a bunch of compile errors like so:
Error CS0246 The type or namespace name 'LocalReport' could not be found (are you missing a using directive or an assembly reference?)
and other similar errors. The weird thing is, when I open up the files containing the errors, the errors go away, but as soon as I try to build my project, they reappear! What's going on here? How can I compile my project without errors?
The problem was that the report viewer library I added the reference to required .NET Framework version 4.6, but my projects were only using version 4.51. Upgrading to v4.7 solved the problem.
Have a VS 2012 project for which i'm trying to create a build xml for command line build. Inside the VS 2012 the build runs fine, but while running command line build using MSbuild i'm getting an error,
error CS0234: The type or namespace name 'Tasks'
does notexist in the namespace 'System.Threading'
(are you missing an assembly reference?)
Project is targetting Dot net 4.5 framework which is already installed. The OS is windows 2008 R2 X64. I know the error is regarding the incorrect framework reference but unable to find the cause, as this is working fine inside the VS 2012. Does this have to do with the OS being X64? Can anyone point out where its going wrong? thanks..
Solution:
Thanks to Jon Skeet for this , i was using MSBuild from framework 3.5, Adding to this you need to mention Toolsversion attr in the begining of build xml else the aspnet compiler from V2.0 will be used causing error target framework not found
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)
EDIT: I modified the question title
after understanding the actual
problem.
I tried to run the sample RSS reader from Codeplex. I tried it on CTP version of the Windows Phone Developer Tools and it worked ok on that.
But now after trying it on beta version of the tools, it gave me following error.
The type or namespace name 'Phone' does not exist in the namespace 'Microsoft'
(are you missing an assembly reference?)
Its not able to locate the assembly Microsoft.Phone.Controls. Though I've installed beta tools successfully on my machine.
What could be the problem?
There are large changes in the namespaces and dlls between CTP and Beta. Most of the Microsoft.Phone namespaces have been merged into a single dll, when in the CTP they were in separate dlls.
You'll need to basically remove the invalid references you see in the project tree, and then resolve the missing references in each file.
I'm using Visual Studio 2010 Express for C# and am having trouble installing the code pack.
I downloaded the source from MSDN and don't know what to do with it?
I opened the WindowsAPICodePack.sln and attempted to build the project and got:
Error 16 The type or namespace name 'ContentPropertyAttribute' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Joe\Downloads\WindowsAPICodePack\Shell\CommonFileDialogs\CommonFileDialogRadioButtonList.cs 13 6 Shell
and
Error 13 The type name 'IComponentConnector' could not be found in the namespace 'System.Windows.Markup'. This type has been forwarded to assembly 'System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Consider adding a reference to that assembly. C:\Users\Joe\Downloads\WindowsAPICodePack\Shell\obj\Debug\Controls\CommandLinkWPF.g.cs 42 99 Shell
each about 5-6 times each.
I attempted to build the samples also but got similar errors.
How do I install the code into Visual Studio?
How do I fix the errors?
How do I include the code into my projects?
Can I make the Library usable in my projects with just a "using" command?
Add a reference to System.Xaml.dll to your project.
I've just downloaded version 1.0.1, opened it up in Visual Studio 2010 Professional and built it with no problems at all.
Check which version of .NET your projects are now targeting. It's possible that the Express edition automatically "upgrades" projects to target .NET 4, whereas mine have been left targeting .NET 3.5.
Another thing to check - do you have .NET 3.5 installed? I'd expect so, but it's worth checking.
When you've built the projects, you need to do two things to use them:
Add a reference to the built assembly (e.g. Microsoft.WindowsAPICodePack.dll)
Add a using directive to the appropriate namespace. (This is actually optional, but otherwise you'll have to use the fully-qualified name for any type in the library, which isn't generally what you want.)