i followed the instructions to setup the standalone myproject.xlsm and myproject.py file with the hello UDF inside but the UDF is not loading. How do I get it to load? The documentation only specifies how to load UDFs using the ribbon add-in. There is almost zero reference to how to go about using it in standalone mode.
When I run ImportPythonUDFs sub i get the following error
Anyone had any luck in getting UDFs to work in standalone mode?
Related
So here's the situation. I have been using ms access vba for automation at my job. I have access to ms access and notepad++ only with the nppexec plugin. However, g++ is not installed as far as I can tell.
I am looking to use ui automation event handlers but those do not work in vba. Since I have notepad++ i can write out c++ and make that work but in the end, i would like to produce a one click .exe file that runs the add event handlers objects.
The issue is that i cannot compile or run without g++. However I can if I use an online ide. I just need one that will let me download the resulting exe file.
Is there any such tool? Either that or a way to get g++ onto a computer without installing. (Permissions issues)
Thank you.
I'm working on a Django (1.8.6) project and using Visual Studio Online's GIT source control. I am building the application successfully in my local environment and push the changes to the VSO. However, whenever I try to build the application on VSO to be able to benefit from "Continuous Integration" as a next step (will try to deploy Azure), it fails by giving the error below:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Python
Tools\Microsoft.PythonTools.Web.targets (235, 5) The environment 'env
(Python 3.4) (unavailable)' is not available. Check your project
configuration and try again.
Unexpected exit code received from msbuild.exe: 1
My build definition on VSO:
Build Definition Screenshot
Python Version: 3.4.3
VS Version: 2015
Any suggestions regarding to my case is highly appreciated.
This is a known issue for PTVS. MS is still working on it. Refer to this thread for details: https://github.com/Microsoft/PTVS/issues/128
There is a workaround in that thread you may use, I quote it here. The second link is unavailabe now, but the first one still works.
For deployment via PowerShell, I found this, which looks correct
AFAIK.
http://www.kenneth-truyers.net/2014/02/06/deploying-cloud-services-to-azure-with-powershell/
You can also use the Python Azure SDK to deploy, but that's not as
well documented. This is what this test does:
https://github.com/Azure/azure-sdk-for-python/blob/master/tests/test_servicemanagementservice.py#L940
Both of these assume that you are able to create the .cspkg, as that's
the file you have to upload to blob storage.
I'm trying to deploy my ActiveX Control DLL developed in ATL project in VS2008 (I'm new to this kind of deployment).
Follow some tutorials, I'm trying to create msi file for my control using Setup Project in VS2008. I've set the Register property of Primary Output to vsdrpCOM. It built with no errors, but I got the warning: Unable to create registration information for file named. Although I can install the control in IE, it doesn't work but displayed with a red X icon. I've also tried other Register options but it's no use.
I think my control is still not registered during installation because of the warning.
Could anyone please give me some instruction to solve this? I've spent hours on google :-(
Thank you!
Use the property vsdrfCOMSelfReg.
See http://msdn.microsoft.com/en-us/library/h793hc1y%28v=vs.90%29.aspx.
I develop a Win32 C++ cgi app for windows and linux and start from scratch.
I use CgiCC as lib and Visual Studio 2010 as IDE.
How can I debug that? When I instanziate my cgicc class the program holds and waits for CGI input I guess.
How can I set up an environment for my CGI input?
I set some environment variables like QUERY_STRING.
But I have no idea how to provide the values my cgi app would get while running on a webserver.
EDIT:
I am almost there.
I captured the traffic while browsing and wrote that content to a file.
Then I redirected stdin to that file: "< input.txt" as debug command line arguments in visual studio.
I set some environment variables under windows like CONTENT_LENGTH and CONTENT_TYPE.
after that I can read some content from my input like this:
cgicc::Cgicc cgi;
string u = cgi("user");
but i get an exception (reading from unallocated memory and exceptions like that) while doing this:
vector<FormFile, allocator<FormFile>> files = cgi.getFiles();
somehow not everthing if loaded correctly.
CGI apps receive their input via environment variables and standard input, so you can easily replicate the environment that a web server sets up for the CGI task.
As far as environment variables, here is a list of the environment variables that are part of the CGI protocol. I recommend that you set all of them, either by hand or better yet, by capturing the environment given to a working cgi app by a production web server. Since environment variables are inherited by child processes, if you set these up in your environment inside a Windows command prompt and then invoke the Visual Studio IDE from that same window then these variables will be available when your CGI application starts inside the debugger and also when you run it without debugging.
Getting a standard input replacement can be a bit more complex in your case, since you are working with a file upload form. This site contains a template that should get you started with the multipart/form-data format. The official document for file uploads via forms is RFC 1867.
I hope this helps.
Solved it by myself:
Build cgicc with the same visual studio version that I compile my project with.
Build cgicc as a static library instead of a dynamic library.
Setting the preprocessor define CGICC_EXPORTS in my project which activated __declspec(dllexport).
Then it worked!
I have a Visual C console application (created in VC++2008EE) and I need to add GUI to it.
One idea was to invoke the console app as a subprocess and communicate with it using stdin and stdout. I tried to do that with Python subprocess module - but it deadlocks (probably because my console app is running continuously). As I understood from http://www.python.org/dev/peps/pep-3145/ it is not possible now to integrate continiously running console application with python subprocess module.
The other idea (more strait-forward probably) was to add a form to this console application project. But as I try to do it VS convers the project to one with "Common Language Runtime support" whatever it means, ads the form, a cpp file for form - and it's not compiling anymore saying:
Command line error D8016 : '/MTd' and '/clr' command-line options are incompatible
error BK1506 : cannot open file '.\Debug\Form_TEST.sbr': No such file or directory
No idea what it means. I have never dealed with C++, but I have used C and Python some time.
What would you recommend?
If you own the code for the console app, don't mess around trying to talk to it using input and output streams. Extract the logic of your console app into a library, and call that library from a GUI of your choice - either Windows.Forms from C#, Python GTK, ordinary GTK.
The reason that VS turns your application to CLR type is becuase it accidently thinks that you want to use winforms which are part of the .NET framework and the only way to use them is if your project is .NET as well.
You do have other options:
1. Add MFC GUI - native C++ GUI
2. better yet create a new .NET project (C#/VB.NET) with the desirect GUI and call your C/C++ dll using P-Invoke or COM interop