Visual Studio Project Name with containing ".com" - visual-studio-2010

I work with Visual Studio 2010. I wanted to create a Project (Windows Forms Application) with the Name:
MyCompany.MyApplication.CommunicationConfiguration.Test
If I want run this project I get the error message:
Error while trying to run project: Unable to start program '...\bin\Debug\MyCompany.MyApplication.CommunicationConfiguration.Test.exe'. Access is denied.
After trying with different names and option I found out that visual studio has problem if the project name contains '.Com'.
So names like '.Com.Test' , 'HelloWorld.Communication' etc. throws exceptions. But if '.com' is the end of the name there is no problem.
My question now is, if someone knows if there is a rule which says that '.com' is not allowed in project names unless at the end of the name. I didn't found any rule in the internet and also visual studio doesn't warn by creating a project with '.com' inside the name.
Thanks in advance for your help!
Regards
rhe1980

I'm not getting a repro for this at all, Windows 7 x64. This is almost surely environmental, most likely related to your anti-malware software. Looks like it might fumble the parsing of the filename, giving up the ghost when it contains multiple dots. The .com part of the problem is somewhat significant, it is the filename extension for 16-bit non-relocatable programs back in the MS-DOS days.
Try this on another machine. You could try killing processes with Taskmgr.exe one by one to find the trouble-maker.

Related

CustomAction log name error 0x8007007a in WiX

I am currently working on a custom action in a DLL that I export to be used by a WiX installer and I recently discovered the following error in the log when I ran the installer:
<exported_name_cut_off>: Error 0x8007007a: Failed to copy CustomAction log name: <exported_name_NOT_cut_off>
As I am relatively new to Windows programming and Wix, when I noticed the DLL function name was cut off in the error message I immediately thought there must be some limit of 31 characters on exported function names in DLLs, but that apparently is not the case; it turns out that this is a limitation of WiX of which I was unaware.
So, I have two questions here:
Is there a limit on the length of an exported or imported function name in DLLs? I could not find any mention of this in the MSDN help. If it is relevant, I am coding in C++ and using Visual Studio 2010 on Windows 7 x64.
I found this, but unfortunately, there was no good answer given for why there is such a limit in WiX. Does anyone out there know why it is limited in this way? Is it still the case in WiX versions greater than 3.5.2519 (the version I am using)?
You control the name you pass to WcaInitialize; it doesn't have to be an actual function or custom action name so you can shorten it however you want. The WcaLog* functions use it to prefix your logging so it's not vital; you can even pass NULL if you want.
The limit still exists in WiX v3.6 and v3.7 beta builds.

Something strange happens with ASP.net resources files

Something strange happens to me today.
I’m working on a Multilanguage application using global resources.
I have several files, one for each language. i.e. companies.es.resx, companies.en.resx, etc.
Nothing special or different from any other ordinary Multilanguage app.
Today, the app fail and I traced the problem to be that HttpContext.GetGlobalResourceObject didn’t find the resource file.
After scratching my head for a while, I remember that yesterday, before I closed my Visual Studio, I delete a resource file that was garbage. This file was unused and in fact it was empty.
Just for “You never know” I create a new empty resource file, and Walla!!! Everything begins to work perfect again.
The ONLY difference with this file, is that is named without the language like test.resx.
I don’t get it, It is so weird.
Another funny thing is that when I try to access the resources with “Resources.” Test is the only resource I get.
Any Idea what is happening?
I’m using visual studio 2010 with MVC 3.
Thanks!
Edgar
Default resource file (without any language extension like companies.resx) is required with other language based files (like companies.es.resx or companies.fr.resx) when working with resources files for multilingual project.
Reasons: When no file exist, matching with the current culture then default file is used by .net. For example you have two language based files
.fr.resx for French
.es.resx for Espanish for instance
And if current user's language is other than these for instance Arabic then the default resource file will be used. i.e. .resx without any specific language extensions.
I had problem with resources in VS2010 too. After trying to reference non existing resource in the resources table Visual Studio was crashing. It didn't even let me to correct the wrong reference because it was crashing all the time.
I fixed this problem by deleting the wrong line in the file with regular text editor and after that running the VS again.
It seems that VS2010 has some issues with resources.

Double filenames aren't compiled?

I'm having a problem compiling files in Visual Studio 2008 (Express edition).
I have two folders with an Entity.cpp file in them, they're both added to the solution but only the first is compiled.
If I change the name of either one of them it compiles correctly, but if both have the same name they're ignored. (Though changing included headers does make it try to recompile.. but it says no relevant changes are detected and linking errors still happen)
Thanks in advance!
The problem with Visual Studio is that Folders and Filters are not related.
You say that they are in different Folders (physically, on your disk), but are they in different Filters in your solution?
I don't remember having any problem of this kind, but I sure got kicked more than once because I had not put the file in the solution...

How do I open a copied project in Visual Studio?

I have copied a whole project onto my PC, both into My Documents/Visual Studio and into inetpub/wwwroot, but when I try to open the project in Visual Studio, it tries to open just 1 file .vssproj and gives me error messages, like : "The project file cannot be loaded. The application for project ... is not installed.". What am I doing wrong?
If VS 2005 has not been upgraded to Service Pack 1 then a web application project (rather than a website) will give this error.
I had this same exact error when double-clicking on the file as opposed to going to VS and using its menu to open it. It seems a problem with file associations.
As others have said, without knowing a specific error it's hard to help. However, the sln and csproj files are just text files, you can always just open them up in notepad and do a search and replace on any obvious path problems. It's often quicker than creating a new project and adding all the files / references.
Without telling the specific error you're getting it's hard to help, but I'm guessing the file paths in the project file are incorrect. Try creating a new project and manually adding the files and see if you get the same errors.
Without the specific error messages, it's tough to be sure, but if you have an entire solution from your source machine rather than just a single project, you may want to try copying that over instead.

Regenerate missing AssemblyInfo.cs in VS 2005

I'm trying to build a small VS 2005 solution I've just checked out of source control, and I'm getting this easy to understand error:
...\AssemblyInfo.cs' could not be
opened ('The system cannot find the
file specified. ') (The file is fairly
obviously missing)
Because this file's automatically generated, I've never paid it much heed before, and in VS 2003 (which I still work with day to day - pity me) it never seems to matter if it's missing.
So 2 questions:
1. How can I get VS 2005 to regenerate the file.
2. Could anyone explain to me in a couple of sentences what the assembly info file is all about, why it's generated, why it's a good idea to have an automatically generated file critical to my solution building etc etc.
Thanks - Andrew.
Edit: OK, I've googling some more, and it's probably significant that this is in an Nunit Test Project.
Update: Deleting the reference in solution explorer an Alex suggested did the trick, and the project now builds, but I'm not entirely happy with that as a solution. If the file is so unimportant, why is it generated in the first place? And if the file does perform a vital task, what am I missing out on by just deleting it?
Also, is it even possible to get it back? Either by getting VS to regenerate it, or by manually hacking one up (possibly using another as a template)?
This file contains assembly-wide settings like assembly version, name, etc. It is automatically generated when you change those settings using properties pages of the project. You should have this file in the project with sort of transparent icon (I think it is in resource folder or something like this by default). Locate it in the project tree and delete it. Visual studio will stop looking for it during build.
PS: assuming the path starts with .. and not ... then this file should be located one folder up from the project in the source control. So you can try looking there.

Resources