visual-studio-2012

MVC Razor helper does not exist in current context

匆匆过客 提交于 2019-12-14 01:29:06
问题 I have created a custom razor helper in my MVC4 Web application that I need to be usable in all of my views. In all of my view pages, I can't seem to use my custom helper. VS2012 doesn't just see it. How Can I resolve this please ? EDIT : It actually works when I run the page, it's just VS that doesn't see it. Here is my helper which is located in Helpers.cshtml within my AppCode folder. @helper TextBox(string title, string id, string placeholder, bool required){ <ul> <li> <label for="@id">

Visual Studio Linker Error while linking SFML-2.1

旧巷老猫 提交于 2019-12-14 00:09:44
问题 #include <SFML/Graphics.hpp> int main() { sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); sf::CircleShape shape(100.f); shape.setFillColor(sf::Color::Green); while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) window.close(); } window.clear(); window.draw(shape); window.display(); } return 0; } i included additional directories to C:/SFML-2.1/include and linker to C:/SFML-2.1/lib i get the errors such as following

Array in my debug mode only display first 14 elements and the rest are display (?) question mark [duplicate]

血红的双手。 提交于 2019-12-13 23:29:54
问题 This question already has answers here : Get question mark instead property name and value in Debug Mode in Visual Studio (9 answers) Closed last year . I am using windows 7 x64. I happens to notice this problem yesterday. In the code, I have a array of type int and size 500, or anything actually and X > 14 I am using a for loop to put number into that array. And, I set a debug break point at the end of the loop to look at the element in the array. But, only the 0-14 elements of the array

AppHarbor build error with nuget packages

别来无恙 提交于 2019-12-13 21:24:40
问题 I'm getting a build error when deploying to AppHarbor from bitbucket. It's related to one of the projects not being able to resolve a dependency which should come from Nuget. Everything builds and runs fine on my machine. Knowledge - I am very well versed with Nuget and an experienced dev. I probably caused this by shuffling folders around locally and recreating the bitbucket repo. I've checked the bitbucket source and it seems everything is there compared to local. My solution is structured

Mute/Unmute Application Sounds

二次信任 提交于 2019-12-13 21:12:49
问题 How do I mute/unmute sounds in my application without touching the master volume control of my computer when the the code I'm using is: My.Computer.Audio.Play(My.Resources.audio_here, AudioPlayMode.Background) 回答1: Take a look at the waveOutSetVolume and waveOutGetVolume functions in winmm.dll Private Declare Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Integer, ByVal dwVolume As Integer) As Integer Private Declare Function waveOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As

Visual Studio 2012 error: The application was unable to start correctly (0xc0000007b)

China☆狼群 提交于 2019-12-13 20:59:11
问题 I am trying to run a opencv program. I have configured opencv accordingly but I am getting the Visual Studio 2012 error "The application was unable to start correctly (0xc0000007b)." Following is the code I am trying to run. #include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv; using namespace std; int main(int argc, char* argv[]) { VideoCapture cap(0); // open the video camera no. 0 if (!cap.isOpened()) // if not success, exit program { cout << "Cannot open the video

BaasBox and C# from WP8?

隐身守侯 提交于 2019-12-13 20:36:08
问题 I'm doing some test from my WP8 device and try to connect a native app to the BaasBox service. Since BaasBox doesn't have support for WP yet, i'm trying to establish a connection following the supported JavaScript documentation The C# code using the HttpClient class: using (var client = new HttpClient()) { //Send HTTP request //This code sets the base URI for HTTP requests, //and sets the Accept header to "application/json", which tells the server to send data in JSON format client

C++ Variable expressions for defining array size?

天涯浪子 提交于 2019-12-13 19:47:46
问题 I'm a newb at C++ and I practice coding on my school computer, so I have to use an online compiler (www.CompileOnline.com). I have a variable that is defined by a function and is then used to initialize an array like so: int var = function(a); int num[var]; This code works just fine on the website, but on Visual Studio Express 2012 it gives me an error: C2057: expected constant expression Is this a problem with Visual Studio? I've read that it's a C++ rule, but then why does it work on the

Compiler failing on C++11 instructions in a Visual Studio project configured with cmake

无人久伴 提交于 2019-12-13 19:17:08
问题 I am trying to build the voxelterrain library (C++, Ogre) on a 64 bit Windows Machine with Visual Studio 2012. CMake seems to run without an error (see output below). When I try to compile the library I receive several errors. I have no idea about CMAKE but I assume that the compiler is not interpreting C++11 correctly. For example: this code ... template <class T> using weakPointer = std::weak_ptr<T>; gives this error: error C2988: Unerkannte Vorlagendeklaration/-definition error C2059:

Targeted .NET Framework version change

若如初见. 提交于 2019-12-13 19:06:38
问题 How do I go about changing the version for the targeted version of the .NET Framework from 4.5.1 to 4.5 in Visual Studio 2012? 回答1: You can usually select your desired target framework within the application properties. Your setup may be slightly different, my Visual Studio installation is using the C# development settings by default, and the example image below is from a WPF project (on the off chance yours is different). Either right-click on your project in the Solution Explorer and select