I wrote a C_Wrapper for a DLL (C ++).
This DLL is imported in Labview.
Since there are many problems with this import in Labview, I would like to know:
Is it possible with Labview and Visual Studio to debug this DLL step for step
In Visual Studio navigate to Debug->Attach to Process then select labview.exe (note: at that time your labview code which uses dll should be already ran). Now you will be able to catch all labview calls to your dll and debug it inside of VS environment (note: you can see all data passed from labview, put your breakpoints into c++ code, etc...).
This is indeed possible. I suppose you already have a visual studio project to build your DLL.
Go to your project's property pages and set the Debugging->Command parameter to the location of LabVIEW.exe (usually installed at C:\Program Files\National Instruments\{Your LabVIEW version}\LabVIEW.exe)
Then just hit F5 to start LabVIEW under the debugger.
Yes, this is possible. I tried it with Visual Studio 2015 and LabVIEW 2015
Configure you project in Visual Studio (taken from here https://msdn.microsoft.com/en-us/library/605a12zt.aspx)
Right-click the project node in the Solution Explorer and select Properties. Go to the Debug tab.
Make sure that the Configuration field at the top of the window is set to Debug.
Go to Configuration Properties / Debugging.
In the Debugger to launch list, choose Local Windows Debugger
In the Command box, add the fully-qualified path name of the application: C:\Program Files (x86)\National Instruments\LabVIEW 2015\LabVIEW.exe
Set Attach to Yes
Configure LabVIEW DLL call
Make sure your VI calls a DLL from /Debug/ folder and not from /Release/ folder
Start Debugging
Run Debug in Visual Studio. Make sure LabVIEW process is attached
Add breakpoints if needed
Start your VI
Related
I am using Visual Studio 2017 on Windows 10 with the official UWP sample code.
There is a UWP sample called basicinput that runs as a release build within the Visual Studio IDE without a problem.
My problem is:
when I attempt to run the release basicinput.exe executable by a mouse click (outside of the Visual Studio environment) I get an error saying that some DLLs names of the form vs*.dll can't be found.
I did a search for those .dlls and tried moving them to same folder as basicinput.exe, but then the application just hung.
What don't I understand?
What am I doing wrong?
As #Chuck-walbourn says, your application will appear in the Start Menu. If you want to deploy it to another computer (that doesn't have VS installed) you will need to create AppX packages using the menu item Project -> Store -> Create App Packages.... If you need more help with that. see the MSDN docs.
If you want to run your app from the command-line or from the Win+R dialog (with a simple name like foo.exe) you can create an appExecutionAlias for your application.
Working with DLLs using C++, I've come across an issue, the code builds but does not compile/run in Visual Studio. When I use Visual Studio 2017, the problem is "xxx.dll is not a valid win32 application", when using Visual Studio 2010, it's something like "xxx.dll is missing ", the code builds fine, it just doesn't run in Visual Studio, I'm a newbie in DLLs and need to use some sort of debugger.
DLLs don't run. They contain code that is loaded by something else. You can't just run a DLL in Visual Studio. You need an executable (EXE) which loads the DLL.
You can set an executable which runs when you press Start Debugging. This is done in the properties of the project. By default, this is set to the variable $(TargetPath), but you can change this to launch anything under the debugger.
I don't have VS2017, but here is the project properties for VS2015:
I have a Visual Studio (.Net) project. When I hit the rebuild option in VS it compiles perfectly. In the Output window I only see the progress but it doesn't show how Visual Studio is compiling (compiler, arguments, etc. etc.)
How can I see the exact thing visual studio is executing in order to compile my solution?
Open Visual Studio and in the Quick Launch (Ctrl+Q) window type "MSBuild".
Then in the window that pops up, change the msbuild project output verbosity to Detailed. Or, play around with the settings to get the amount of output that you like.
I get a rather unusual error in Visual Studio 2013 in Visual Basic when trying to work with Entity Framework. This doesn't matter whether I work with an existing project or create a new one. It started to happen when I changed to a new PC with Win 8.1.
I create a new model using the wizard from a database. It creates the diagram very nicely. However, I get an compilation error telling the library EntityFramework.dll doesn't exist. However, the only thing is that the path to EntityFramework.dll is wrong (Looks like: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\..\IDE\EntityFramework.dll). The address, however, would be D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE. Where would I change that value?
Ueli
Apparently when reinstalling Visual Studio to a different drive the %VS120COMNTOOLS% environment variable is not updated correctly and points to the folder on the drive where VS was originally installed. The template for generating DDL SQL is using the %VS120COMNTOOLS% environment variable to find assemblies it needs to generate the code. Since the variable is pointing to a folder that no longer contains the necessary files the T4 template transformation fails.
Troubleshooting:
Open the developer command prompt for VS2013
set the variable manually to point to the correct location (e.g.
set VS120COMNTOOLS="D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\")
start VS from the command prompt by executing devenv
verify if things now work
(Note that if you follow the above steps to set the variable it will only work for VS instances started from this command prompt.)
If the above works go to the computer properties (e.g. in Win 8/Win 8.1 type "This PC" in the search window), right click on the icon and select "Properties", go to the "Advanced" tab and click the "Environment Variables" button, then in the "System variables" window find the VS120COMNTOOLS variable, double click (or click the "Edit" button) and fix the variable so that it points to the right folder.
Don't forget the last backslash after Tools... C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools <---- will not work, but... C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\ <--- will work
It might look funny but I encounter the same issue (with windows 8.1) but none of the suggested methods worked for me!!
I checked my environment variables it had the correct path but when I tested it with explorer (typed %VS120COMNTOOLS% in explorer's address bar) it does not showed up!! Rather it said
"windows cannot find %VS120COMNTOOLS% make sure you typed the name correctly"
So what I did was I just deleted the variable and recreated it with the exact same path
and after rebuild the error gone!!!
So if you guys have the same issue give it a go
In my case, it was a permission issue and not related to the environment variable file path as the path was correct in my case.
So what I did is added permissions to my current user on the whole visual studio installation folder and then launched Visual Studio as administrator. I re-generated my Model and it worked!
I had this problem with VS2013 on Windows 8.1. I solved the problem by copying
EntityFramework.dll and Microsoft.Data.Entity.Design.dll
from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools
The files are in both locations and now everything works fine.
I had to delete my DB Entity Model and start over again to get things working.
It's probably just an MS coding error making VS2013 look in the wrong place.
I had this problem with VS2013 on Windows Server 2012R2. Two drives (C and D). I tried repairing and uninstall-reinstall but that didn't fix anything. It was hacky but I got it to work.
First I changed the system variables to go from D to C. To do this, go to Control Panel --> System and Security --> System. On the left hand side you will see Advanced System Settings. On the bottom of the Advanced tab you see Environment Variables. I had to edit VS120COMNTOOLS to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools. It previously was D:\Program Files\Microsoft Visual Studio 12.0\Common7\Tools.
Then I copied the EntityFramework.dll and Microsoft.Data.Entity.Design.dll from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\IDE. If the IDE folder doesn't exist then create one. That is what I had to do. Seems so strange but it works!
I had to delete the current edmx in my project, readd it, and restart VS. Such a wierd problem and took me quite a while to piece together multiple stackoverflow articles to get the whole problem solved.
The following path of %VS120COMNTOOLS% is working for me:
set VS120COMNTOOLS="D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\"
I also faced the same issue. I have my VS2012 at "D:\Program Files (x86)\".
I tried to set the common folder for VS using the following set command from VS2012 command Prompt.
set VS120COMN="D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7"
This resolved the issue for me.
I have a small windows forms application created in Visual Studio 2012 that uses ReportViewer version 11.0.0.0.
The application target framework is .NET 4.0 and its deployment method is ClickOnce
On my PC it installs but on client machines, intallation fails with error
the application requires that assembly microsoft.reportviewer.processingObjectModel version 11.0.0.0 be installed in the global assembly cache first.
On the client machines, i have installed
.NET 4.0
ReportViewer 2010
Microsoft Report Viewer 2012 Runtime CTP
SQLSYSCLRTYPES.msi
in the project application files settings, i have set microsoft.reportviewer.processingObjectModel publish status to Include(Auto), in the references i have also set its Copy Local property to True.
what am i missing?
I have even followed the instructions here http://msdn.microsoft.com/en-us/library/ms251723.aspx
Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Goto the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Goto "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut
you are missing the ProcessingObjectModel.dll file find the version 11.0.0.0 in gac assembly C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel and add it to bin dir.
We had the same issue, but the thing is, its automatically adding it to the references (microsoft.reportviewer.processingObjectModel), if u EXCLUDE it from the publishing properties(properties->publish->application files), It might fix it.
A better option would be to install the Microsoft Report Viewer 2010 SP1 Redistributable Package at:
http://www.microsoft.com/en-us/download/details.aspx?id=6610
Your users will need to have this package installed as well. If you just copy and paste a MS DLL, you'll have to redeploy it every time you upgrade your application.
If you are using WinForms, to me it seems pointless to worry about installing this DLL in the GAC when it's being used for a report viewer that is deployed via click-once. This isn't a big file and you're probably using it as a report viewer control on a form, nothing more. One possible solution is to do the following:
In Visual Studio, go to the reference in your project for the assembly Microsoft.ReportViewer.ProcessingObjectModeland locate the file path to the folder for that assembly. Mine was version 12 and so my file path was C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\12.0.0.0__89845dcd8080cc91
Copy the file path of the folder the assembly is in and remove the reference from your project (right click the reference and select "Remove").
Win + R to get a 'Run' prompt. Paste that folder path in there and execute to jump right into the folder of that DLL.
Find the DLL, it should be the only file in that folder, and copy it to your Visual Studio project folder. You shouldn't care about 100kb of extra space on your drive consumed, and I don't think this DLL is one you'll need to update.
Back in Visual Studio, right click References, Add Reference, and browse for that DLL in your project folder. After adding the reference, make sure that the Copy Local property is set to true.
Clean and rebuild, test the application on your local computer, than Deploy your ClickOnce again.
Now when users install your application with ClickOnce, the reference will not refer to the GAC at all and there won't be any need to rely on the prerequisite check/installation process for this DLL because you have included it directly in your published application.
It depends on the setup type you are using but basically, it means the required library is missing from your server or computer. To enable the application to download from the server (In a client-server architecture), you need to include the file(s) in the project.
Go to your application option and locate the "Publish" tab
Click on "Application files"
In the ensuing dialog, select to include all the libraries you want included (or that are required to run your application on the client machine and click "Ok")
Build your application and then publish to the server.
I hope this works for you, it worked for me in Visual Studio 2010 Professional
In case of Windows 10 it won't work installing Microsoft Report Viewer 2010 SP1 as describe by user1236560. First you need to install Prerequisites for SQL Server Management Objects (SQLSysClrTypes.msi) need to choose between x86 and x64 depending on your hardware. You could find it on: http://origin.www.ms.akadns.net/downloads/en/details.aspx?FamilyID=16BC778C-357B-46E9-8356-D575903AC831
After that you need to install MICROSOFT® REPORT VIEWER 2012 RUNTIME that you could find on: https://www.microsoft.com/en-us/download/details.aspx?id=35747
Both of this package will have to be installed.
I encountered this error
System Update Required
Unable to install or run the application. The application requires that assembly
Microsoft.ReportViewer.ProcessingObjectModel Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) first.
Please contact your system administrator.
this error popped out when installing an application made from Visual Studio
meaning I am one of the client
I have Visual Studio 2015 and a Microsoft SQL Server 2014 and didn't know about Crystal Reports and other related stuff to it. I do check the version of my .NET Framework which is version 4.6.2.
I have several extension files and distributable files downloaded and yet doesn't solve my problem.
I do not know if I solve the problem generally but I do become successful in installing the application
so I downloaded and installed the ff:
SAP Crystal Report for Visual Studio 2015(latest, just to make sure)
Microsoft System CLR Types for Microsoft SQL Server 2012
Microsoft Report Viewer 2012 Runtime.
the problem took me about 2 days to trouble shoot, Be careful on downloading and installing extension files and distributed files cause it will munch some space too.
The Best answer is:
Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Go to the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Go to "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down.
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut
It reduced all of my head aches.