Quantcast
Channel: Visual Studio General Questions forum
Viewing all 21115 articles
Browse latest View live

devenv preprocessor directives with Android projects in Visual Studio 2015

$
0
0

Hi all,

I have a Dynamic Shared Library project in Visual Studio 2015. I want to automate it using devenv and pass along preprocessor directives.

I know that with a normal Win32 C++ project, all I would need is to code:

#if defined(DIRECTIVE)
#pragma message( "Message from compile-time!" )
cout << "Message from run-time!" << endl;
#endif

and then a script that would just set CL and run devenv:

set CL=/DDIRECTIVE
devenv.com solution.sln /Build

but for a Dynamic Shared Library project this just doesn't work.

It could be that Visual Studio's integration with Android isn't complete yet, but still, does anyone know how to solve this?


VS FTP Login freezes on Windows 10

$
0
0

On a basic project-less website, under the Website menu --> Copy Website, it opens the FTP login window asking for user id and password to connect to my server to upload my website files.

Since I have upgraded to Windows 10, Visual Studio freezes at this FTP login window (it won't even let me type in a name or password), and I have to shut it down VS using task manager.  This was not a problem in any previous version of Windows -- only in Windows 10.

I am currently using VS 2013, but I saw where someone posted in another forum that they were experiencing the exact same problem with VS 2015.

[win10 & VS2015] Compile Error in a simple C project: "(" should be input after "_CRTIMP_ALTERNATIVE " in stdio.h

$
0
0
1>f:\program files\vc\include\stdio.h(288): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
1>f:\program files\vc\include\stdio.h(288): error C2085: “scanf_s”: 不在形参表中
1>f:\program files\vc\include\stdio.h(290): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
1>f:\program files\vc\include\stdio.h(297): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
1>f:\program files\vc\include\stdio.h(297): error C2085: “_snprintf_s”: 不在形参表中
1>f:\program files\vc\include\stdio.h(300): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
1>f:\program files\vc\include\stdio.h(309): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
1>f:\program files\vc\include\stdio.h(309): error C2085: “sscanf_s”: 不在形参表中
1>f:\program files\vc\include\stdio.h(311): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
1>f:\program files\vc\include\stdio.h(314): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
1>f:\program files\vc\include\stdio.h(314): error C2085: “_snscanf_s”: 不在形参表中
1>f:\program files\vc\include\stdio.h(315): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
1>f:\program files\vc\include\stdio.h(342): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
1>f:\program files\vc\include\stdio.h(342): error C2085: “_vsnprintf_s”: 不在形参表中
1>f:\program files\vc\include\stdio.h(345): warning C4081: 应输入“)”;找到“字符串”
1>f:\program files\vc\include\stdio.h(346): warning C4003: “__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_ARGLIST_EX”宏的实参不足
1>f:\program files\vc\include\stdio.h(346): error C2085: “_snprintf”: 不在形参表中
1>  “F:\Program Files\VC\bin\CL.exe”中的内部编译器错误
1>    请选择 Visual C++
1>  “帮助”菜单上的“技术支持”命令,或打开技术支持帮助文件来获得详细信息
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

"Visual studio 2010 shell invalid license data. reinstall is required" when trying to edit file.

$
0
0
I am running a fresh copy of Win10 installed from a purchased CD. It is therefore not an update from a Win8 system. I have installed Visual Studio 2014 Community. I also seem to have some tools installed from VS 2013, I ssume from the same install. I am using Filezilla to download the web.config file from a website I support. It downloads onto my system OK but when I try and edit it, I get the error message shown in the title. I don't know how VS 2010 comes into the picture, it's not installed, so can anyone tell me how to get round this problem.

Razor Support for Html5 and mp4 video

$
0
0

Hi:

I have an mvc web app in which I need to show mp4 video.  When I add the following code to a razor page:

<video controls="controls" autoplay="autoplay"><!-- MP4 must be first for iPad! --><source src="BigBuckBunny_320x180.mp4" type="video/mp4" width="320" height="240" /></video>

I get a message in the Edge browser that it is an"Invalid Source".  When I create an html page in the same app, right click it and run it in a browser, it works fine.  Is this feature part of Microsoft's traditional war against web standards or am I missing something here?  Is there any work around for this?

Any help greatly appreciated.

RBS

Data source not displaying correctly when using Add Existing Item

$
0
0

Visual Studio 2012
vb.net 3.5

I have some new data source files in my project directory but when I try to use Add Existing Item to add them to my project they don't appear correctly. Included screenshots will describe my problem. For the purposes of this demonstration we are using two data sources.. one which displays correctly and one that does not:

Working: dsPCATypeList
Not: dsPCAListSB

I open the project, rightclick on the project Node and select Add Existing Item


I select the dsPCAListSB.xsd file


dsPCAListSB.xsd now shows in the project item lists but the icon is different than the other data sources

If I toggle the Show All Files (A) button you can see that the file structure for dsPCAListSB is not the same as dsPCATypeList. Letter B shows the dsPCAListSB.Designer.vb file is listed by itself (B) rather than under the dsPCAListSB.xsd file (C). Letter D shows the structure of the working data source.



If I look at the files for both data sources on the disk they seem the same


The only way I've found to get around this problem is to edit the .vbproj file directly and add the relevant sections. Text is for a different, non-working data source which was fixed by this code.



I would really like to use the Add New Item functionality so I don't have to edit the .vbproj file but I'm clueless as to why this is happening. Any information or instruction would be most appreciated.

Thank you!



Visual Studio Emulator for Android is not updated

$
0
0

I used Windows 10 and Visual Studio 2015 with service pack 1. From Visual Studio Emulator for Android in device profile available only API 19.

I see a warning:

Unable to establish a connect to the internet. Only device profile for acquired platforms are shown

I reinstalled Visual Studio Emulator for Android. I I disabled the firewall. But emulator is not updated.

How do I fix this error? Help me, please.

Rolling Back From A Change

$
0
0

Hello:

I'm trying to troubleshoot an issue I've encountered, and I'm not sure how to fix it. I'm teaching myself C# development using ASP.NET and in the course of developing one of the practice examples, from the course I'm using (LearnVisualStudio.net), I started getting an error that indicated that I should run iisrestart and an appcmd command to fix it (I am no longer able to reproduce the error, so I won't be able to post it here). To make a long story short, I tried running the commands and now when I try to run my apps from VS2013 I get a page that looks like an FTP file directory display, listing all the files in my project. Does anyone know how to fix this, so that when i run my app it shows the web page and not this directory? I have a screen shot of the FTP-like view, but I'm unable to attach it here at the moment. If you'd like to view it, please let me know and I will send it to you. Thanks for any help you can offer.

Andre


PE file Optional Header checksum

$
0
0

Hi

I generate and sign my app using makecert & signtool commands. After signing the executable file, the checksum field of optional header changed from 0 to some value, Then I changed some bytes of the executable file using a binary editor program then I run the executable file but it runs normally and Windows does NOT alert that file is changed!

Why code signing not works? What is it for digitally signature?

How to add email address to a certificate

$
0
0

Hi

I generate a certificate using makecert.exe and using signtool.exe to sign my app. But in the file properties dialog box on digital signatures details the email field is "Not available". How can i add an email address to it (or and other extra information)? is it depend on certificate file (makecert) or signtool?

Also what is "Countersignatures" sectiton?

Another question:

When generating the certificate for code signing is it necessary to use passwords (requested by makecert & pvk2pfx tools)? or can i set them to none?

Thanks


Visual Studio 2015 Intellisense | MVC Views

$
0
0

I'm running Visual Studio 2015, and the large website I work to manage is all built in MVC. VS2015 is great, I love it.

One thing I've noticed, and this is actually been this way for a long time, is that the intellisense for recommended css classes only work in Visual Studio when editing a page that actually referenced the stylesheet. So if I'm editing a layout page, it works great, but if I'm edit any of the other 900 views that aren't the layout page, I don't have any recommended classes.

Is there a way in VS2015, to create background references, so I could get the intellisense recommended classes without making any code changes? This would be great for JavaScript references as well.

Getting Busy Message When Pasting

$
0
0

Everytime I paste something into the HTML/Design view of aspx page (not code behind) VS freezes and I get the "Microsoft Visual Studio is Busy" message. I've researched this many times and have tried many different things, but none of them seem to work.

I've just updated my VS2015 with Update 1. I also tried to install a hotfix to fix the pasting issue, but I guess this was already included in the update. I am still having issues.

Is there something else that might be causing this issue?

Execution path analysis

$
0
0

I need a way to analyze how a line of code can be executed, but am having some difficulty.  Currently, I'm doing it manually, which is a real PITA and think that an automated solution should be available.  My steps as of now are:

  1. Use the Call Hierarchy to determine where a function is being called from.  If this is a constructor, this may not work as it doesn't seem to detect this as a function, in which case I have to find in Current Project with Match CaseMatch Whole WordUse Regular Expressions, something like <class-name>\s+[a-zA-Z_][a-zA-Z0-9_]*|new\s+<class-name>, which is a nuisance as I then have to filter the overloaded constructors by hand.
  2. Have to do a manual find in Current Project with Match CaseMatch Whole Word on<function-name> to find any messages that this can be called from if any.  This more or less works and I could refine it to look for ON_MESSAGE()/ON_BN_CLICKED()/etc... macro usage, but may miss things like ON_EVENT_RANGE()/ON_COMMAND_RANGE()/etc... However, in any of these cases, this could filter out those symbol names that are not actually the symbol names I'm looking for (i.e. not a member of the correct class) which is bad, but let's say, 'tolerable' for the moment.
  3. Have to also detect if called from a Invoke(DISPID dispidMember, REFIID riid, LCID, WORD wFlags, ...) function as this is a dispatcher for a COM API and then determine what COM function was called to generate this call.
  4. Go to step 1 on the current function until this is determined to be recursive or there are no more ways to have this called (e.g. called from a GUI event, a COM API call, etc...).

All of this is not a trivial task, and I'm actually missing the conditionals that are in the functions to get to the line where the function call is being generated, which would be a good idea.

I'm looking for ideas as to how I can possibly implement this code path analysis tool or if one is in the works from MS?  I'm thinking I might be able to do this with the help of the .pdb files, but given that I have to do a find text instead of symbols, I'm afraid that I'm going to start something that will not pan out due to limitations of the system which I really don't have time for.

Can anyone tell me if this is the case or not and or if something is already in the works so that I don't waste my time?

My platform is Win32/64, MFC, C++ native.

Thanks,

A

p.s. if this is the wrong forum, please point me in the direction of the correct one.  Thanks


I don't mind someone marking a post as "Proposed as answer", but DO NOT mark it as "Answered". If I am the OP, I will decide if a post actually answers my post or not. Thank you.


Where is ASP .Net Configuration Tool in Visual Studio 2013

$
0
0

Where is ASP .Net Configuration Tool in Visual Studio 2013?  I need it and can't find it.  A search on the web lead me to a lot of non-working information.  

I am quite frustrated and unable to do what I need to run a business.  Why keep changing things?  Should I just never upgrade so I don't get any more nasty surprises?  Are you trying to phase out Web forms?  I absolutely hate MVC and refuse to use it.  I don't have the motivation, time, energy or money to redo everything I have ever done to fit the new paradigms being shoved down my throat.  I'm trying to run a business.

side by side configeration error , after packaging a application from visual c++ 2008 mfc application

$
0
0

My application is giving a error saying " The application has failed to start because its side-by-side configuration is incorrect.Please see the event log or use the command-line sxstrace.exe tool for more detail.

I have run the sxstrace. exe tool while my opening my application. i was able to get the following,

/****************************************************************************8/

INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Reference: Microsoft.VC90.DebugMFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
INFO: Resolving reference for ProcessorArchitecture WOW64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\LiveVision_RollerMaini\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\LiveVision_RollerMaini\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Program Files (x86)\LiveVision_RollerMaini\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\LiveVision_RollerMaini\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.

/*****************************************************************************/

Iam using Visual c++ 2008 MFC Dialog based application


How to update Nuget on VS 2012?

$
0
0

Hello all. I'm trying to use the SIMD functionality of .NET 4.6.1 in Visual Studio 2012 (express desktop) and I'm having some trouble. I'm able to target .NET 4.6.1 in the Project Properties page, but when I right-click the project in the Solution Explorer, select "Manage Nuget packages...", search and select the "System.Numerics.vectors" package and attempt to install I get an error claiming:

"The System.Numerics.Vectors 4.1.0 package requires NuGet client version 3.0 or above, but the current NuGet version is 2.8.60318.677".

When I click the "Upgrade NuGet" button nothing seems to happen. Can someone please provide some guidance? Thank you in advance.

-L

Web.config transforms, multiple builds and doing transforms at deploy time.

$
0
0

Hi,

We currently have a number of large websites that we are looking at using web.config transforms.   We have web.configs for INT, INTBranch, QA, QABranch, Loadtesting, Staging, Production, Debug, Release, etc.

We are using a best practice of taking whatever build binaries we pushed to QA, being the same binaries that we push to Loadtesting, Staging and Production.  We DO NOT want extra builds for each environment as the build for Production could potentially be different than the one tested in QA.

Today we copy Web.config.QA -> Web.config,  Web.config.PRODUCTION -> web.config  but the binaries are exactly the same and come from the same build.

With Web.config transforms,  Can we do the transform of the config at deploy time without rebuilding the binaries?

Are there any documents out there that might show how this is done?

Thanks in advance.


Thanks Lance

Android Emulator on Windows 10 Home

$
0
0

I have Windows 10 Home and I don't see the Hyper-V option in Windows features.
I will run VS2015 Emulator for Android?.

Best regards.

Stop Visual Studio 2013 from changing the file encoding?

$
0
0

Hello,

I use Visual Studio to edit python scripts (.py files). When I do this, I prefer to use a particular file encoding. However, my VS seems to set the encoding to UTF-8 all the time. Here's what I am seeing:

  1. Open a file, and check its encoding via "File; Advanced Save Options...". This would show "UTF-8 with signature" is the encoding.
  2. Change the encoding to my preferred one.
  3. An asterisk appears next to the filename in the VS editor tabs, indicating that the file has changed, and needs saving.
  4. Save the file. A warning comes up to say I'm about to change encoding, which might cause problems for file diff. Say OK to this warning.
  5. Close the file. Check the encoding in Notepad++. All is fine.
  6. Reopen the file. Add a trivial change, say, a space.
  7. Save the file again. The warning about changing encoding appears again. Say OK to that too.
  8. Check Advanced Save Options to see that encoding is once again UTF-8. Notepad++ reports encoding is UTF-8 as well.

Does anyone know what settings I can change to avoid this behavior, please? This is driving me crazy!

Thank you very much.

how to backup Microsoft visual studio 2015

$
0
0
Hi..

recently i have downloaded Microsoft visual 2015. It work well, but i have to installed it in many computer and it is not possible to download it for each and every computer so i am searching a way, so that i can install it to other computers.

Since i have already downloaded all files in my personal PC i tried to direct copy its installed files from program files but failed....

please suggest me a way... to install visual 2015 from one pc to another..\

thanks...

Viewing all 21115 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>