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

How to modify environment in Mac OS with TFS 2015 build step

$
0
0

Hi all,

I use new build definition in TFS 2015 update 3.

During queuing the build, I need to modify environment on Mac OS/Linux with "Shell Script" build step, but I have not found "Modify Environment" option which is on "Batch Script".

Is there another way to do it on Mac OS/Linux?

Thanks,

Phuc Nguyen


Xamarin IN App Billing

$
0
0

Hi,

We have developed a Xamarin app and have successfully deployed it to iOS and Google Play stores.  We are now trying to implement In App Purchases.  I have implemented In App Billing and deployed to Alpha Testers.  When trying to purchase a product from the app we get a message saying "App isn't responding.  Do you want to close it?  I can not figure out what's the error since I use my device to test it and no return logs.

What are the things should I modify in my codes? And how will I detect the errors or bugs during testing in my device? Is there a way to know the return logs while testing in the device? Thank you very much for the help.

Here are the codes which I have followed from the API and in the forums:

var iapService =DependencyService.Get<IIAPService>();string[] productsId ={"search_product","search_product1","search_product2"};var product = iapService.GetProducts(productsId);
await DisplayAlert("Number of Product", product.Result.Count().ToString(),"Cancel");var purchase = iapService.Purchase("search_product2");
await DisplayAlert("Purchase", purchase.Result.PaymentId,"Cancel");publicinterfaceIIAPService{Task<IEnumerable<InAppProduct>>GetProducts(string[] productsIds);Task<NativePurchaseResult>Purchase(string productId);}

//IAPService

public async Task<IEnumerable<InAppProduct>>GetProducts(string[] productsIds){if(!isConnected)
                await Task.Run(async ()=>{int retryCount =0;Connect();do{
                        await Task.Delay(250);
                        retryCount++;if(retryCount ==120)thrownewException();}while(!isConnected);});var _appProductsResponse = await _serviceConnection.BillingHandler.QueryInventoryAsync(productsIds,ItemType.Product);if(_appProductsResponse ==null)returnnull;var iapProducts =newList<InAppProduct>();foreach(var googleProd in _appProductsResponse){var prod =newInAppProduct{
                    SKU = googleProd.ProductId,Name= googleProd.Title,Description= googleProd.Description,Price=Convert.ToInt32(googleProd.Price)};// Remove Google stupid app name added to IAP products
                prod.Name=System.Text.RegularExpressions.Regex.Replace(prod.Name,@" ?\(.*?\)",string.Empty);

                iapProducts.Add(prod);}return iapProducts;}

//Purchase

public async Task<NativePurchaseResult>Purchase(string productId){NativePurchaseResult nativePurchase =null;

            await Task.Run(async ()=>{if(!isConnected){Connect();do{Task.Delay(250).Wait();}while(!isConnected);}
                _purchaseTask =newTaskCompletionSource<NativePurchaseResult>();

                _serviceConnection.BillingHandler.OnProductPurchased+=BillingHandler_OnProductPurchased;

                _serviceConnection.BillingHandler.OnProductPurchasedError+=BillingHandler_OnProductPurchasedError;

                _serviceConnection.BillingHandler.OnPurchaseConsumedError+=BillingHandler_OnPurchaseConsumedError;

                _serviceConnection.BillingHandler.OnUserCanceled+=()=>{if(_purchaseTask !=null)
                        _purchaseTask.TrySetCanceled();};string token =LoadPurchasedItems(productId);if(token !=null|| token !=string.Empty){
                    _serviceConnection.BillingHandler.ConsumePurchase(token);}

                _serviceConnection.BillingHandler.BuyProduct(productId,ItemType.Subscription,Guid.NewGuid().ToString("N"));
                nativePurchase = await _purchaseTask.Task;});return nativePurchase;}privatestringLoadPurchasedItems(string productId){try{// Ask the open connection's billing handler to get any purchasesvar purchases = _serviceConnection.BillingHandler.GetPurchases(ItemType.Subscription);if(purchases !=null){foreach(var item in purchases){if(productId == item.ProductId){return item.PurchaseToken;}}}}catch(Exception e){return e.Message;}returnnull;}

Best Regards,

Mark

Initializing Templates

$
0
0

I am using VS 2015.  Anytime I try and open a file from my test project, I get the window "Initializing templates..." and VS hangs and will never let me back to the solution.  I have to kill it with task manager.  

I opened the solution with VS 2013, and I do see the "Initializing templates..." window, but only for a few seconds.  

I have searched this site, but have not found any solution that works.


Bill Behning

Building a Custom Video Player App with VS Community 2015

$
0
0

Learning VS | First Education Project Help Needed: 

I've installed VS Community 2015 as my choice of IDE. I have a simple local video player education project in mind to learn with.

I searched for sample projects and could not find one that will do what I would like the education app to do. I am hoping someone can suggest the appropriate tools to use or method. There are three content items: one mp4 and two png

When the app is opened, the local 30 minute mp4 (downloaded as part of the app) should load while a logo is overlaid.

There should be no user controls visible (the video content has user instructions).

The logo is shown until the video is fully loaded then mp4 should be paused waiting user touch to begin playback. This step is done and seemed simple enough. Where I have difficulty is deciding the best method for providing additional user interaction during playback for a specific experience.

The application code will have a series of specific times for user interaction during the playback. Here is how it should work:

(Touching the screen will toggle between play and paused states of the full screen video.)

At time 0, pause the video and wait for user touch.

User touch begins playback. (If user touches before time 1 is reached, pause video and display pause poster until touched.)

At time 1, pause the video and wait for user touch.

User touches to begin playback. (If user touches before time 2 is reached, display pause poster until touched.)

At time 2, pause the video and wait for user touch.

User touches to begin playback. (If user touches before time 3 is reached, display pause poster until touched.)

At time 3, pause the video and wait for user touch.

User touches to begin playback. (If user touches before time 4 is reached, display pause poster until touched.)

At time 4, pause the video and wait for user touch.

User touches to begin playback. (If user touches before time 5 is reached, display pause poster until touched.)

At time 5, pause the video and wait for user touch.

User touches to begin playback. Ignore user interaction until playback is complete then display logo with video paused until touched to being a new playback. (This is the same as the user experience began.)


I've considered writing a script to detect the 5 times while listening for the touch event to toggle but it seems like this should be something already available as a snippet sample. I've also considered breaking the video into parts then playing them consecutively which seems inefficient. I also thought perhaps the best approach was to use HTML5 video events.

The goal is for the app to work on all large touch screen devices regardless of OS - hence the choice of HTML5. Any suggestions or links to snippets that can be adapted would be helpful! I would like to be able to re-use the code for educational apps.




I have accidentally made my code dissapear and my program will run but behave unexpected, i dont know what i have done but i have an idea, please help....

$
0
0

So i wanted to back up my program by clicking save project as, on a usb device, but when i returned to the visual studio UI i had some new bars pinned and i cklicked them away and after that i had clicked away my source code accidentally. I can still run the application but it does not respond in anyway. How can i restore this?

Thanks in advance!


Alexander Marin

SSDT BI 2015 - cannot open BIML-generated packages

$
0
0

Whenever I try to open SSIS packages that were generated automatically using BIML the Visual Studio reports the following error. 

Error loading 'FileName.dtsx' : The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.

I tried changing the project degugging option - RunIn64BitRuntime from true to false and modifying regional settings for date formatting. Neither worked.

I have installed the BIDS Helper add-in for Visual Studio 2015 but it didn't help. The problem shouldn't be related to the fact that the package was generated by BIML. All DTSX files are the same and it doesn't matter if it was created manually using Visual Studio or automatically by a third party app.

I am using Visual Studio 2015 Professional with SQL Server Data Tools for VS2015 on Windows 10 x64.

Visual Studio 2015 Update 2 not available for download

$
0
0

Hello,

I tried to download Visual Studio Update 2 few days back. And I see that instead of Update 2, I get an installer for Update 3.

I checked the subscriber downloads as well. The .iso is available only for Update 1 and Update 3.

Is Update 2 no longer available ?

Regards,

Veena

ERROR: Unable to start debugging. The startup project could not be launched. Verify debug settings for the startup project.

$
0
0
I have Visual Studio 2015 Community and have tried to debug a Solution. I continue to receive this error message, 

"Unable to start debugging. The startup project could not be launched. Verify debug settings for the startup project." Upon opening VS, I received a message that stated something about a one way upgrade and the Migration Report stated the following,"Visual Studio needs to make non-functional changes to this project in order to enable the project to open in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without impacting project behavior." 

I have tried many different suggestions I found researching this issue, but none of them seem to work. 

Is there anyway to work around and solve this issue so I can use this version of VS?


How to Resolve IntelliSense Issue in Visual Studio

$
0
0
Project is losing reference when referenced assemblies changed in backround.

In our Company are several Visual Studio Developers.
Everyone is using Visual Studio 2015 (Update1 or Update2)
We are using .net C# 4.0.

We are using different Solutions for related features.
Solution 1
- Project 1.1 creates project1.1.dll
- Project 1.2 creates project1.2.dll

Solution 2
- Project 2.1 creates project2.1.dll
- Project 2.2 creates project2.2.dll

and so on.

Some projects refer to other projects in the same solution, but also in projects other solutions.
For example: Solution 1 Project 1.1 refers to assembly  project2.1.dll
Because its in an other Solution, this is not an Project reference. It is a File reference.
The file references point to a network path (e.g. N:\bin\project2.1.dll)

Every project has a postbuild command which runs after building and copies the created assemblies into a network path (N:\bin\).

Works fine in Visual Studio 2010.
Now with Visual Studio 2015 we got the following problem.


Problem:
Developer A has solution 1 open.
Developer B build solution 2 (project 2.1). (Only comments were changed)

Developer A gets red squiggly lines under random classes and interfaces and says "this namespace doesn't exist".
But the
But the Project can be build without errors.

After VS 2015 restart everything is ok, untill someone is building the Project 2.1 again.

How can we solve this Problem. Its very annoying.

VS2015 Community: When I click "Show potential fixes" but don't choose a fix, all error underlines disappear.

$
0
0

I am using VS2015 Community. When I check the potential fixes of an error but don't choose one, all curly error underlines disappear (although the errors are still in the Error List). I only get the underlines back when I edit the file and save it

This really bothers me. Is there a settings tweak to fix this annoying behavior?

Or can anybody reproduce the problem?

Edit: I am using C#.

Regards,

JOHNDOESNON



your licence has gone stale and must be updated

$
0
0

I have a msdn subscription but approximately once a month when I launch visual studio 2013 I get the dialog box saying 'your licence has gone stale and must be updated. Check for an updated license to continue using this product.

I click the hyperlink and off I go. This is all very well if you happen to be online, but if your using your laptop without the internet your are stuffed.

what's the story please?

VS 2013 Prof. edition always shows "Could not complete the action"

$
0
0

Hi all,

When I open any .ascx file VS2013 always shows alert, and when I close, it shows it again.

Could you help please?

Thanks.

Trouble activating VS2015 license with MS account

$
0
0

Hi,

I've been trying for a while now to activate my VS2015 using my microsoft account.

This account is associated with a partner member (our company) and i have been granted a role within that account.

I try to add this account to VS2015 and it still tells me that my extended trial period has expired.

I have two MS accounts in my name, both with the same email address - it appears they are this partner account and my personal account.

The partner account is the one that is associated with the company, so i figured that it should work. The other account is my MS Live account, my personal one. They both have the same email address associated with them.

I've tried every combination of these accounts without any luck and I realize that it must be something simple that I'm missing here.

Is there likely to be anything obvious that I'm missing? Does my association with my company mean that I have access to all the software licences they have, or do they have to grant me specific permission to use VS2015?

Thanks

Pete

 

Occasional flashing in XNA app on Windows 10

$
0
0
Currently we have a 3D app that was developed using XNA for Windows7. We are in the process of upgrading to Windows 10 and have discovered that our app will occasionally have a flashing box near the center of the screen. Has there been any issues related to this when upgrading to Win10? Also, I know that XNA is no longer supported by Microsoft so is there an official replacement from Microsoft?

How to add get/set function by ClassWizard in Visual Studio 2013

$
0
0

I am trying to make activeX control in VS2013
I want to add Set/Get function.
I found information from here, that I should add them through Property Wizard. I also tried it on VS2013, and get this:

Where can I find the add property dialog on Visual Studio 2013?


Will VS 2015 Update 3 Enterprise install and function on Windows 10 with FIPS Compliance turned ON?

$
0
0

I have see various posts which indicate to the contrary? None have been successfully installed to full functionality.

FIPS is a requirement for me.

What is the answer?

How do I do it? I have worn myself out uninstalling and re-installing.

Brad Roberts - aged developer

VS 2013 error: "Attempted TextBuffer edit operation while another edit is in progress"

$
0
0

I´m using Visual Studio 2013 Version 12.0.21005.1 with VB.NET on Framework 4.5.50938, OS is Windows 7 SP1 32 Bit.

I´m randomly getting the error message

"Attempted TextBuffer edit operation while another edit is in progress"

when trying to edit a source file. The file then remains inaccessible until I restart Visual Studio.

This message seems to appear at random and out of nowhere, sometimes after running or debugging the program, sometimes in the middle of editing. I can edit one file, switch to another one and receive this error.

Sometimes I can work half an hour before this message appears, sometimes only a couple of minutes. I´ve been looking all over the web for solutions but can´t find anything.

This error is beginning to severely disturb my work, so any ideas would be highly appreciated.

How to open Design View in Visual Studio Express 2015 ?

$
0
0

Howdy,

(This is likely to be the easiest one of the day...)

If I open an HTML page using Visual Studio Express 2015, it brings me to a Code View.

From that view, how do I launch the WYSIWYG Design View?

(I've read that I should click on the "Design Tab" in the lower left, but no such tab is visible...)

Sincere thanks,

Lothar

Setting up source files. Pre-Made, signature style source files.

$
0
0

Hi VS community;

I'm a starting developer and wanted to find ways of saving myself time when creating new projects. Every time I create a new project some source files are automatically created (i.e. stdafc.cpp, newproject.cpp). I have found myself having to add libraries and comment sections to such files when I create a new project. I was wondering if there is a way of having specific information added to this files so when I create a new project the information is already there. For example:

// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

#include "targetver.h"

#include <stdio.h>
#include <tchar.h>

// TODO: reference additional headers your program requires here

This is the file that has all the libraries I will utilize in my project. However, I usually add so many libraries like <iostream> to it before I even start to write code. I want to simplify that process by having a pre-made style of such document that includes every library I will use when I create a new project. So instead of looking like the above code I would like it to include my other libraries to look something like this: 

// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

#include "targetver.h"

#include <stdio.h>
#include <tchar.h>
#include <iostream>
#include <direct.h>
#include <string>
#include <fstream>
#include <cstdlib>
#include <io.h>


// TODO: reference additional headers your program requires here
 

Also, I try to have a well commented code (like a good programmer!) but again, every time i make a new project i find myself having to add the top comment section that carries some basic info about the program. Something like this:

*-------------------------------------------------------<Title>
Made by:
Date:
Description:


known bugs:


Examples:

---------------------------------------------------------*/

In conclusion, I am wondering if there is a way of creating a template that every project I make could use in order to safe me time adding the libraries I usually use and the comment section every class or source file should have. Like a signature in Outlook. 

I hope this was clear enough, please help. 


Navigation Bar Missing in some documents

$
0
0

I am using Visual Studio Community Edition 2015.

Is it possible to turn on the "navigation bar" (that is what I am calling it), on all documents?

Here is a screenshot of two different documents, one has the bar one does not.

Bar missing


Michael

Viewing all 21115 articles
Browse latest View live


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