|
The assembly would need to become part of the project; easiest way to do so is to create a "bin" folder (or similar) and drop them all there, with "Copy to target" to true. When building, the assemblies would be copied to the build-folder.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Thanks Eddy, I'll keep that in mind.
Brian
|
|
|
|
|
You're welcome
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Hi,
when you want to reuse a library (a managed code DLL file), you must “add a reference” and Visual Studio will include the DLL in your new project and copy it to the approapriate location. Copying the file yourself would not be sufficient.
|
|
|
|
|
Hi Luc.
When you say reference do you mean add "using Engine3" to my code?
If I did that then it still needs to know where to find Engine.dll, maybe your referring to something else.
Brian
|
|
|
|
|
There is a menu item that says either “add ...” or “add reference”, it may be a context menu for your project in the “solution pane”. Look around and you will find it.
|
|
|
|
|
|
I think I found it as Reference Manager.
I have a choice of Solution under Projects or Solution under Shared Projects to browse for the dll file.There is also 'Browse recent' but I don't think that's the right one to use.
Brian
|
|
|
|
|
The details vary for different versions of Visual Studio. The dialog you want is called "Add Reference" in VS2008, and "Reference Manager" in VS2015, I don't know for other versions (VS2019 has been made available just now). And I never used the "shared projects" feature.
|
|
|
|
|
Hi Luc.
I'm using the 2015 version of Visual Studio.
Do you know if it's still possible to download the 2015 version should something happen to my 2015 version of Visual Studio? I'm told that there are errors in latest version of Visual Studio.
Brian
|
|
|
|
|
|
I'm working on an inventory app. The users will take inventory on Android tablets. They will scan the barcode and fill in some info. I will probably serialize the info to an XML file on the tablet.
They will then plug the tablet into a PC and download the inventory files onto the PC which will process it.
2 questions...
First, how can my windows app know when a specifc tablet is plugged in and/or unplugged? I can give the tablets names or Id's if needed.
I guess I could handle some windows function and examine the devices name/Id.
Second, what's involved in getting the data off the tablet? Can the Windows app get files from a specific folder off the tablet? Windows would probably see it as just another drive. The question of access rights comes to mind.
I've never done tablet/PC interaction before.
Is this the best way? I'm open to ideas.
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: First, how can my windows app know when a specifc tablet is plugged in and/or unplugged? I can give the tablets names or Id's if needed.
I guess I could handle some windows function and examine the devices name/Id. Good idea. Next question.
Kevin Marois wrote: Second, what's involved in getting the data off the tablet? Can the Windows app get files from a specific folder off the tablet? Windows would probably see it as just another drive. The question of access rights comes to mind.
I've never done tablet/PC interaction before. If it is attached using USB, the device will ask whether or not to allow access on connection. If the user disallows, there won't be a drive visible.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
If you're also doing the "tablet" development I question the use of Android when you could be using Windows 10 tablets (talking to a PC).
Surface GO is better than anything else out there in that price range.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have a Web Site I am trying to debug and explore. It is used already. It is already in a workable state on the computers of my peers in my development group. I just want to step through the code in debug mode. To do this, according to a peer I work with, I need to start the web site locally and then attack the project I have loaded in Visual Studio to the running project.
This brings me to the error I am stumped on. when I open IIS and click on the option to "Browse *.80 (http)" for the website that is listed and has been validated, it launches the website in a browser but it has an error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module
IIS Web Core
Notification
BeginRequest
Handler
Not yet determined
Error Code
0x80070021
Config Error
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File
\\?\C:\Users\....\web.config
Of course I have modified the path to the web.config to keep this anonymous.
The "Config Source:" on the page has a red highlighted line that has the XML node, <handlers> but this does not seem to be useful information.
The "More Information" area at the bottom of the page says:
More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
View more information »
Since the HResult code is 0x80070021, the corresponding Error message listed on this hyperlink page, https://support.microsoft.com/en-us/help/942055/http-error-500-19-error-when-you-open-an-iis-7-0-webpage is:
Server Error in Application "application name"
HTTP Error 500.19 – Internal Server Error
HRESULT: 0x80070021
Description of HRESULT
The requested page cannot be accessed because the related configuration data for the page is invalid.
The Cause is: This problem can occur when the specified portion of the IIS configuration file is locked at a higher configuration level.
The Resolution is: To resolve this problem, unlock the specified section, or do not use it at that level. For more information on configuration locking, see How to Use Locking in IIS 7.0 Configuration.
This links to this page https://docs.microsoft.com/en-us/iis/get-started/planning-for-security/how-to-use-locking-in-iis-configuration which describes locking of different elements in a configuration file.
Apparently, according to this document online, I might be able to solve this issue by following the steps described.
The page mentions applicationHost.config but the error page I get references web.config but I assume that if I change
<handlers> to <handlers overrideMode="Allow"> then it might work
and yet, intellisense says that "overrideMode" is not an allowed attribute.
|
|
|
|
|
You can "unlock" the relevant sections by using appcmd on the command-line, or by using the "Feature Delegation" option within IIS Manager:
An Overview of Feature Delegation in IIS 7.0 | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
What are the settings I need to have in order to run debug in Visual Studio for a program set up in the IIS?
I have a solution in Microsoft Visual Studio which successfully builds a web solution. This is project is in use and has had other developers work on it. So I can safely conclude that the problem I am having once I run the program locally does not have to do with the code itself but must be on my system somehow.
When I click to run the program by clicking on the proverbial "Run" button in Visual Studio that is renamed as "ISS Express (Internet Explorer)", the browser displays the error:
"Could not load file or assembly 'Extreme.Numerics.Net40.x64.Serial' or one of its dependencies. An attempt was made to load a program with an incorrect format."
I ran the MSI file "Extreme.Numerics.Professional.v5.1.x64" because it was first assumed that the Extreme Numeric was not installed. But when I ran this installer, the dialog window showed that it has already been installed because it offered "Change", "Repair" or "Remove". This implies that it has already been installed.
I went to the IIS and I clicked on the Web site and the "Basic Settings..." and clicked to test the settings, it passed the authentication and authorization.
Please advise. What should I try next or where should I look to get more clues to fix this?
What are the settings I need to have in order to run debug in Visual Studio for a program set up in the IIS?
|
|
|
|
|
This is just a WAG but when I get an error about an incorrect format like yours. It has always been because I am building for 32 bit when a referenced dll or something else requires 64 bit. Try changing your build settings and see what happens. Like I said it has always been that for me.
HTH
Jack of all trades, master of none, though often times better than master of one.
|
|
|
|
|
I'm using VS2013 C# building an application that requires an invoice report.
The report needs to have nested row groups. I'm not sure if I need to use subreports or group within the parent group. The datasets for the report are built in code with objects passed to the report form.
I've been trying to get it to work and can't seem to figure it out. If anybody has any ideas or thoughts I would appreciate it. Please see the example layout below and if more info is needed I'll be happy to provide it.
ACCOUNT 1 (row group)
--------SubAccount1
--------SubAccount2
--------SubAccount3
--------SubAccount4
----Schedule 1 (row group that needs to be related to ACCOUNT 1)
--------Item1
--------Item2
ACCOUNT 2 (row group)
--------SubAccount1
--------SubAccount2
--------SubAccount3
--------SubAccount4
----Schedule 2 (row group that needs to be related to ACCOUNT 2)
--------Item1
--------Item2
|
|
|
|
|
Hi All,
Quick small/big question.
I need to updated a variable set at user level (OS W7/W10)
I wrote a simple C# code for this using
Environment.SetEnvironmentVariable("MYVAR", "SOMETHING-NEW-HERE", EnvironmentVariableTarget.User);
The value is set, but is not broadcast a OS level (explore keeps using old value).
If user logoff and then back on, value is ok
Is there any way to let Explore process know updated value without restarting it or a user logoff/logon cycle?
Thanks,
David
|
|
|
|
|
EmnvironmentVariableTarget.User will work, but it isn't "retrospective" - to apply it to a process it needs to be restarted. There is no mechanism for "reloading" environment variables as they are only read once, when the process starts and are kept in memory from that point.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hi Griff,
To better explain my question
The variable I set by C# is used later by separated process (java)
Script is running at logon time an update (or should) update variable based on %clientname% one (RDP session)
I set the var using:
Environment.SetEnvironmentVariable(name, value, EnvironmentVariableTarget.User)
I'm checking if var is set using
Environment.GetEnvironmentVariable("MYID", EnvironmentVariableTarget.User)
but only reads its value from registry
From here:
[http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-windows-command-line-and-registry/]
When setting environment variables through the registry, they will not recognized immediately. One option is to log out and back in again. However, we can avoid logging out if we send a WM_SETTINGCHANGE message, which is just another line when doing this programatically, however if doing this on the command line it is not as straightforward.
if I set/update the variable in "System Properties -> Environment Variables" and then open a new CMD prompt, its value is updated
Same in C# is not working. The WM_SETTINGCHANGE call I suppose
Thanks,
David
There should be a missing piece
|
|
|
|
|
According to the source, the SetEnvironmentVariable method broadcasts the WM_SETTINGCHANGE message for you:
IntPtr r = Win32Native.SendMessageTimeout(new IntPtr(Win32Native.HWND_BROADCAST), Win32Native.WM_SETTINGCHANGE, IntPtr.Zero, "Environment", 0, 1000, IntPtr.Zero);
if (r == IntPtr.Zero) BCLDebug.Assert(false, "SetEnvironmentVariable failed: " + Marshal.GetLastWin32Error());
If target is EnvironmentVariableTarget.User , the environment variable is stored in the HKEY_CURRENT_USER\Environment key of the local computer's registry. It is also copied to instances of File Explorer that are running as the current user. The environment variable is then inherited by any new processes that the user launches from File Explorer.
...
If target is User or Machine, other applications are notified of the set operation by a Windows WM_SETTINGCHANGE message.
I suspect the problem is that you're calling this from a login script. This Technet post[^] seems to suggest that the message has to be broadcast after the login script has finished.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I did some additional tests using SendMessageTimeout.
Looks working on local PC but it is not in a RDS/Citrix session (at least using W2008r2)
I'll do some other tests tomorrow
|
|
|
|