[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Microsoft Visual Studio

742

Solutions

789

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.

Share tech news, updates, or what's on your mind.

Sign up to Post

Dears ..
I need to make connection between visual studio 2013 and remote oracle database 10g by ado.net
my machine have  windows 8 ..
which tool i would use to make that ?? and which version ??
because i used multi tool without success ..  examble oracle client 11 .. oracle odac 12 and more 11
0
Hi,

I'm just wondering why I can't get specific error messages anymore in Visual Studio when an exception occurs.

For example, I know where this error occured because I'm working in that section of the application, but it used to highlight the line and tell me exactly what caused the problem, now I get a generic error like this:

An unhandled exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll
Additional information: Conversion from string "" to type 'Double' is not valid.

It no longer specifies the line number or highlight the error,

I attached a print screen

Thank you for the help!
printScreen.png
0
I'm trying to build a page so it has access to multiple models, doing this using a view model below. The errors happens on the line in the create method that generates a guid and tries to assigned it to ticket.id .. which the viewmodel has a ticket property so I'm think it should work but im clearly missing something.

This is my Controller:

        public async Task<ActionResult> Create([Bind(Include = "Id,StartTime,EndTime,Title,Description,SeverityType")] TicketViewModel model)
        {
            if (ModelState.IsValid)
            {
                model.Ticket.Id = Guid.NewGuid();
                Technician TechnPhone = db.Technician.Find(model.Technician.PhoneNumber);
                model.Technician.PhoneNumber = TechnPhone.PhoneNumber;
                db.Tickets.Add(model.Ticket);
                await db.SaveChangesAsync();
                return RedirectToAction("Index");
            }

            return View(model);
        }

Open in new window


This is my View:

@model Test.ViewModel.TicketViewModel

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Create</h2>

@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Ticket</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.HiddenFor(m => m.Ticket.Id)
            
        </div>
        <div class="form-group">
        

Open in new window

0
while changing UAC settings in app.manifest  (using Visual Studio 2010)  from
<requestedExecutionLevel  level="asInvoker" uiAccess="false" />
to
<requestedExecutionLevel level="requireAdministrator" uiAccess="true" />
 we are asked to re-start under different credentials and then UAC devenv.exe asks permission to proceed. But the application gives error msg: Error while trying to run project. Unable to start Program .... Running an accessibility application requires following steps described in Help. On clicking Help button it takes us to
 http://127.0.0.1:47873/help/2-4044/ms.help?product=VS&productVersion=100&method=f1&query=vs.debug.error.launch_elevation_requirements&locale=en-US
 
What is the solution..
0
my C# asp.net solution support localization from database, when i call localization class ("Local Resources") its return the string correct in < placeholder>.
but if i call  localization class ("Local Resources") in text=" ". between double quotation. return no result
the code as shown in attached file
viber-image2.jpg
0
I'm creating a service website using visual studio 2015 and VB web form site, I need the user to select a date to book in for a service using calendar control and for that date to be put into car service date field in the database which is NULL at the moment,  how would I go about doing this, I'm struggling because I'm new to VB and many website tutorials cover c# for this particular question.
0
Hello Experts,

I kind expert wrote a the following C# script. I don't get any errors when I debug it with Visual Studio. However, I'm not sure how to test the script with input/output data. Can someone please show me how to add data to the script. For example, for hours I would like add 6, and for capacity I would like to add 7200

using System.Threading.Tasks;
using System.Net;
using System.Net.Http;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
        }

        public class test
        {

            const double revenuePerkW = 0.12;
            const double technicianCost = 250;
            const double turbineCost = 100;


            public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
            {

                //Get request body
                dynamic data = await req.Content.ReadAsAsync<object>();
                int hours = data.hours;
                int capacity = data.capacity;
                //Formulas to calculate revenue and cost
                double revenueOpportunity = capacity * revenuePerkW * 24;
                double costToFix = (hours * technicianCost) + turbineCost;
                string repairTurbine;
                if (revenueOpportunity > costToFix)
                {
                    repairTurbine = "Yes";
                }
                else
                {
                    repairTurbine = "No";
                }

            

Open in new window

0
Hello Experts,

Before you look at this question, I just want to point out that I'm an extreme newbie with C# when I debug the following c# program in Visual Studio I keep on getting the following errors

'a namespace cannot directly contain members such as fields or methods' at the following lines of code

using system.Net;

const double revenuePerkW = 0.12;
const double technicianCost = 250;
const double turbineCost = 100;

public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{

The full c# program is as follows:

using System.Net;

const double revenuePerkW = 0.12;
const double technicianCost = 250;
const double turbineCost = 100;

public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{

    //Get request body
    dynamic data = await req.Content.ReadAsAsync<object>();
    int hours = data.hours;
    int capacity = data.capacity;

    //Formulas to calculate revenue and cost
    double revenueOpportunity = capacity * revenuePerkW * 24;
    double costToFix = (hours * technicianCost) + turbineCost;
    string repairTurbine;

    if (revenueOpportunity > costToFix)
    {
        repairTurbine = "Yes";
    }
    else
    {
        repairTurbine = "No";
    }

    return req.CreateResponse(HttpStatusCode.OK, new
    {
        message = repairTurbine,
        revenueOpportunity = "$" + revenueOpportunity,
        costToFix = "$" + costToFix
    });
}

Open in new window


Can someone please let me know how to fix this problem.

Cheers

Carlton
0
I have made an application that detects,pairs and connect discoverable Bluetooth devices.Also I have made an application that encrypts and decrypts file. Now I want to check whether an already paired device is in range. If I select an already paired device and it is not in range then the function for encrypting the file must be activated and if that selected paired device comes in range then function for decryption must be activated. How can I implement it? Please suggest any solution.
I have also attached visual c# files for both applications as well.
BluetoothApplication2.sln
EncryptDecrypt.sln
0
We have a web application designed on Visual Studio 2008.
Can we move everything to VS2016?
Will there be any issues? Are they compatible?

Thanks in advance.
0
I upgraded my VS2005 to VS2013 and I'm now unable to access my Database schema (.XSD File).
When I double click it I get the following Screen Shot...how do I fix this?

Thanks,
Mark
Error.jpg
0
TITLE Program Template          (RevStr.asm)

; This program reverses a string.

.model flat, stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
Writestring PROTO
INCLUDE (where you have it stored)\Irvine32.inc

.data
aName BYTE "Abraham Lincoln",0
nameSize = ($ - aName) - 1

.code
main PROC

; Push the name on the stack.
      mov ecx,nameSize
      mov esi,0

L1:      movzx eax, aName[esi]      ; get character
      push eax                  ; push on stack
      inc esi
      Loop L1

; Pop the name from the stack, in reverse,
; and store in the aName array.
      mov ecx, nameSize
      mov esi, 0

L2:      pop eax                  ; get character
      mov aName[esi],  al            ; store in string
      inc esi
      Loop L2

; Display the name.
      mov edx,  OFFSET aName
      call Writestring
      call Crlf
INVOKE ExitProcess, 0
main ENDP
END main
0
Backing up Access Linked table to separate Access Db using VB.net and Visual Studio 2012.
I have tried code I found on Expert Exchange published 2010-03-30 by DDB. It uses ADODB which does not work well with Visual Studio 2012.
0
Hi,

I hope that someone is able to help. The web development team have changed the current website that we are using. We have an order download application that integrated into mageno.

The issue is that I try to change the endpoint address to the following and I receive an error:

https://old.filofax.co.uk/index.php/api/v2_soap/index/?wsdl=1

Error message is attached(error1)

I have also tried to generate a proxy class using the same error message.

My issue is that I can browse to this URL ok.

I would appreciate any help. I have contacted the hosting company and they don't have any iea.

Best Regards,

Ross
error1.png
0
I am making a student planner/grade report app for
Android Studio class in college. I was just wondering if anyone is experienced with using android Studio?
0
Due to account restrictions I have my own local account, and we have an "admin" account that we use to run specific applications, for example Visual Studio. We simply login with our regular account then Run as administrator the shortcut. TFS then used this admin account for our mappings etc.

Unfortunately due to a password change this no longer seems to be working, and all my mappings are not available! In Team Explorer if I hold the mouse cursor over the Team Project it says Connected as: MyLocalAccount, however when I've checked a colleagues it says their admin account.  So now in Team Explorer it's looking for me to configure my mappings, and when I try and use the existing project it says it's already mapped (presumably under my other account).

I've tried clearing the TFS cache on the C drive, I've added & removed the details under Credential Manager in Windows (several sources suggested this online) but nothing has worked. Using the Credential Manager various blogs suggested I'd be presented with a dialog box to login when I next tried connecting to TFS, however this has never appeared!

I've been working on a piece of code and I'd ideally like to not have to create a new mapping and start / copy over code.
0
We just purchased action pack and get Dynamics CRM on the cloud using the 5 licenses. I would like to create a test project in visual studio and try to call the web api. Can you show me something how can i do the set up?
For now, all i need is below:

1. create a static method to check the connection is valid or not. return true or false
2. create a static method to read all leads inside of lead entity.  and that is all i need.
0
Hi Team,

I have old version of application developed using MS Visual Studio 2.0 used below code for set security setting to access .asmx web service

using Microsoft.Web.Service3;
using Microsoft.Web.Service3.Security;
using Microsoft.Web.Service3.Secuirty.Tokens;

///initialise the username token for soap security header

private void setsecuritysetting(mywebservice mywebservice)
{
usernametoken usertoken = new usernametoken(this.mywebserviceusername, this.webserivcepassword, passwordoption.sendhashed)

soapContext requestContext = mywebservice.Requestsoapcontext;
requestContex.security.token.add(usertoken);

}

I have upgraded this application from VS 2.0 to VS 2015 (4.5.2) but above code is not working
0
how can I design a software that looks like quick books in visual studio
0
Could anybody help?
In Visual Studio 2013
In a body of html page I put following code:
 
<script>

    var tdElm = document.getElementsByTagName('td');
       console.log(tdElm);
       console.log(tdElm[0].children);
       console.WriteLine(tdElm);

    </script>

Open in new window

and got a following error:

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'WriteLine'

What sould I do to fix it?
0
I just upgraded to TFS 2017 and deployed an agent and created a new build. I am getting the following error when building:


No agent found in pool Default which satisfies the specified demands:
msbuild
visualstudio
vstest
Agent.Version -gtVersion 1.98.1


I have tried install Visual Studio 2017 Pro, updating the agent, installing build tools, restarting the Agent service, restarting the service, unregistered and registered the Agent. None of these steps have helped.
0
I already set the navigation bar background color to Cyan, when i run it to emulator it is showing correctly but after creating apk file and install it to my android phone then navigation bar background color is showing white.so what is wrong with this? how is it possible?and how to solve this?

I am using visual studio 2015 14.0 and xamarin version is 4.7.10

my code is
<ResourceDictionary>
                <!-- Pallete -->
            <Color x:Key="primary-back-title-color">#2bcbff</Color>
            <Color x:Key="primary-title-color">Black</Color>
                <!-- Pallete-end -->
                <Style ApplyToDerivedTypes="true" TargetType="NavigationPage">
                    <Setter Property="BarBackgroundColor" Value="{StaticResource Key=primary-back-title-color}"/>
                    <Setter Property="BarTextColor" Value="{StaticResource Key=primary-title-color}"/> 
                </Style>
            </ResourceDictionary>

Open in new window

Screenshot_2017-11-08-12-48-50.pngScreenshot_2017-11-08-12-48-50.png
0
Hello
i am not able to debug my xamarin.ios project using iphone simulator on mac using Visual Studio Community for MAC
i am sure i was able to debug  perfectly without any issues.
but now i am getting below error:
"cannot execute ".../myproj/bin/iphonesimulator/debug/myapp.exe"

i am able to run app on iphonesimulator without any issues
( run -->start without debugging).

But i need to debug my app ( run--> start debugging) to debug my code.
i am using :
Apple Developer Tools
Xcode 8.3.3 (12175.1)
Build 8E3004b

Xamarin.iOS
Version: 11.4.0.93 (Visual Studio Community)
Hash: 1b460cb9
Branch: d15-5
Build date: 2017-10-13 18:49:56-0400

Xamarin.Mac
Version: 4.0.0.93 (Visual Studio Community)

Xamarin.Android
Not Installed

Xamarin Inspector
Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1



Operating System
Mac OS X 10.12.6
0
We have just upgraded to VS2017 Pro

however, when trying to publish, i get the above error
I've tried editing the project file with stuff i've found online, the current settings are: (and still not working)
  
 <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <!--<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>-->
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildProgramFiles32)\MSBuild\Microsoft\VisualStudio\v14.0</VSToolsPath>
  </PropertyGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

Open in new window


before this error, i got another error,
webapplication-targets-was-not-found
which i fixed by following this article
https://alastaircrabtree.com/microsoft-webapplication-targets-was-not-found-again/

I'm not sure if they are connected

I've followed some other articles which has a microsoft hotfix, but i think it applies to an old version of visual studio as i get an error when running "not applicable for you" or words to that affect

There is a hack to write gatherallfiles=true in project config, but that basically published all the aspx and aspx.cs files, which i cannot have

Does anyone have inner knowledge of this? I spent 7 hours going through all the various examples online, so chances are if you just put the above into google, i've already tried it.
0
I am setting up a build definition on my MS Team Service in the cloud that includes a unit test. The unit test actually makes a database call to our test database.  I am using Visual Studio Build, copy files, Visual Studio Test Tasks. I am confused as to how to set up a connection to my test database which s not on the cloud but on an in-house virtual server. Any suggestions will be welcome.
0

Microsoft Visual Studio

742

Solutions

789

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.