Меню Рубрики

Windows store в visual studio

Visual Studio C# не получаеться начать.

Хотел ознакомиться с языком по книге от издательства О’Рейли «Изучаем С#».
В начале книги предлагают создать приложение windows store в VS ( Windows Store -> Blank App (XAML) ).
Скачал студию 2015, сначала комьюнити версию, потом профессионал (видимо пробную).
Но к сожалению ни там, ни там пункта Windows Store.

Кто разбирается, подскажите, пожалуйста, от чего зависит наличие этого пункта меню, что бы можно было сделать так, как просят по книге.

Наблюдатель, да пропусти ты это всё. Это не важно для изучения языка.

cin
Хотелось бы по этой книге просто, нравится серия.

Наблюдатель. ну делай по книге, не обязательно для этого магазина что-то делать. Суть в коде.

Наблюдатель
> В начале книги предлагают создать приложение windows store в VS ( Windows Store -> Blank App (XAML) ).

мдя, ну и книги нынче пошли.

Шилдт Герберт — Полный справочник по C# вот тоже хорошая книжка для начинающих, гугл в помощь, есть кстати еще хорошая подборка по всем темам разработки — http://www.gamedev.ru/files/?id=112926 не обошли там и C#, есть экземпляры и на на русском)

cin
> ну делай по книге, не обязательно для этого магазина что-то делать. Суть в коде
Да, поразбирался, можно делать windows presentation foundation приложения, они не громоздкие, но отличия некоторые есть, конечно.

А вот пункта для создания приложения для магазина нет ни в каких версиях, поставил даже как в книге 2012 студию експресс, но этого пункта нет. Сделать приложение для магазина, хорошая мотивация. Но видимо политика, всё-таки. Жаль.

Наблюдатель
> . Сделать приложение для магазина, хорошая мотивация.
Угу, если книгу тиражом в 10к продали, значит будет +10к приложений в магазине, хоть и все одинаковые.

kipar
Проблема, видимо не в том, что данное приложение нельзя в магазин выложить, а вообще никакое нельзя.

Наблюдатель
> Но к сожалению ни там, ни там пункта Windows Store.
Вероятно при установки Visual Studio не все галочки были поставлены а значит и
нет нужных templat’ов.
1. Найди в списке установленных программ Microsoft Visula Studio, выбери её и нажми «Изменить»
2. Проверь выбраны ли соответствующие компоненты Windows Store App SDK или как-то так.
Если они не выбраны то выбери их и все автоматом установятся. Название компонента я
возможно не точно написал, сейчас нет возможности глянуть, только вечером.

Add:
Windows Store App уже устарели. Теперь это Windows Universal App ну
и template теперь назвывается Visual C#->Windows->Universal->Blank App (C#)
это про 2015ю студию.

TheLightWay
> Add:
> Windows Store App уже устарели. Теперь это Windows Universal App ну
> и template теперь назвывается Visual C#->Windows->Universal->Blank App (C#)
> это про 2015ю студию.

Спасибо, большое за подсказку.
Есть эти пункты. Сам бы ни за что не догадался.
Видимо сама книга уже устарела.
Теперь можно дальше разбираться.

Источник

Пошаговое руководство. Создание и выполнение модульных тестов для приложений для Магазина Windows Walkthrough: Creating and Running Unit Tests for Windows Store Apps

Эта статья относится к Visual Studio 2015. This article applies to Visual Studio 2015. Если вы ищете последние версии документации Visual Studio, используйте средство выбора версии в верхнем левом углу. If you’re looking for the latest Visual Studio documentation, use the version selector at the top left. Мы рекомендуем выполнить обновление до Visual Studio 2019. We recommend upgrading to Visual Studio 2019. Скачать эту версию можно здесь Download it here

Visual Studio включает поддержку модульного тестирования управляемых приложений Магазин Windows 8.x Windows 8.x Store и шаблоны библиотек модульных тестов для Visual C#, Visual Basic и Visual C++. Visual Studio includes support for unit testing managed Магазин Windows 8.x Windows 8.x Store apps and includes unit test library templates for Visual C#, Visual Basic and Visual C++.

Дополнительные сведения о разработке приложений Магазин Windows 8.x Windows 8.x Store см. в разделе Начало работы с приложениями Магазина Windows. For more information about developing Магазин Windows 8.x Windows 8.x Store apps, see Getting started with Windows Store apps.

Visual Studio предоставляет следующие возможности модульного тестирования: Visual Studio provides the following unit testing functionality:

В следующих процедурах описаны этапы создания, выполнения и отладки модульных тестов для управляемого приложения Windows 8 Магазин Windows 8.x Windows 8.x Store . The following procedures describe the steps to create, run and debug unit tests for managed Windows 8 Магазин Windows 8.x Windows 8.x Store app.

Предварительные требования Prerequisites

Visual Studio Visual Studio

Создание проектов модульных тестов Create unit test projects

Создание проектов модульных тестов для приложения Магазина Windows To create a unit test project for a Windows Store app

В меню Файл выберите пункт Создать проект. From the File menu, choose New Project.

Откроется диалоговое окно «Создать проект». The New Project dialog displays.

В разделе «Шаблоны» выберите язык программирования, на котором требуется создать модульный тест, а затем выберите связанную библиотеку модульных тестов Магазин Windows 8.x Windows 8.x Store . Under Templates, choose the programming language you want to create unit test in and then choose the associated Магазин Windows 8.x Windows 8.x Store unit test library. Например, выберите Visual C# , затем выберите Магазин Windows, а затем Библиотека модульных тестов (приложения для Магазина Windows). For example, choose Visual C# , then choose Windows Store, and then choose Unit Test Library (Windows Store apps).

Visual Studio включает шаблоны библиотек модульных тестов для Visual C#, Visual Basic и Visual C++. Visual Studio includes unit test library templates for Visual C#, Visual Basic and Visual C++.

(Необязательно) В текстовом поле Имя введите имя, которое будет использоваться для проекта модульного теста Магазин Windows 8.x Windows 8.x Store . (Optional) In the Name textbox, enter the name you want to use for the Магазин Windows 8.x Windows 8.x Store unit test project.

(Необязательно) Измените путь, по которому нужно создать проект, введя его в текстовом поле Расположение или с помощью кнопки Обзор . (Optional) Modify the path where you want to create the project by entering it in the Location textbox, or choosing the Browse button.

(Необязательно) В текстовом поле имени Решение введите имя, которое будет использоваться для решения. (Optional) In the Solution name textbox, enter that name you want to use for your solution.

Оставьте флажок Создать каталог для решения установленным и нажмите кнопку ОК . Leave the Create directory for solution option selected and choose the OK button.

В обозревателе решений появляется ваш новый проект модульного теста Магазин Windows 8.x Windows 8.x Store , а в редакторе кода отображается модульный тест по умолчанию с именем UnitTest1. Solution Explorer is populated with your new Магазин Windows 8.x Windows 8.x Store unit test project and the code editor displays the default unit test titled UnitTest1.

Правка манифеста для проекта модульного теста Edit the Manifest for the Unit Test Project

Может потребоваться изменить манифест для проекта модульного теста, чтобы предоставить необходимые возможности запуска приложения. It may be necessary to edit the manifest for the unit test project to provide required capabilities to run the app.

Изменение файла манифеста приложения для Магазина Windows проекта модульного теста To edit the unit test project’s Windows Store application manifest file

В обозревателе решений в новом проекте модульного теста Магазин Windows 8.x Windows 8.x Store щелкните правой кнопкой мыши файл Package.appxmanifest и выберите Открыть. In Solution Explorer, in the new Магазин Windows 8.x Windows 8.x Store unit test project, right-click the Package.appxmanifest file and choose Open.

Конструктор манифеста открывается для редактирования. The Manifest Designer displays for editing.

В конструкторе манифестов перейдите на вкладку возможности . In the Manifest Designer, choose the Capabilities tab.

В списке в разделе Возможностивыберите возможности, необходимые для модульного теста и тестируемого кода. In the list under Capabilities, select the capabilities that you need your unit test and the code that it testing to have. Например, установите флажок Интернет , если модульный тест и проверяемый им код требуют возможности получения доступа к Интернету. For example, select the Internet checkbox if the unit test needs and the code it is testing need to have the capability to access the internet.

Выбранные функции должны включать только возможности, необходимые для правильного функционирования модульного теста Магазин Windows 8.x Windows 8.x Store . The capabilities you select should only include capabilities that are necessary for the Магазин Windows 8.x Windows 8.x Store unit test to function correctly. Эти возможности никогда не должны включать функции, которые не входят в состав тестируемого приложения Магазин Windows 8.x Windows 8.x Store , и обычно должны представлять собой подмножество функций, определенных для тестируемого приложения Магазин Windows 8.x Windows 8.x Store . The capabilities should never have to include capabilities that are not part of the Магазин Windows 8.x Windows 8.x Store app being tested and generally should be a subset of the capabilities specified for the Магазин Windows 8.x Windows 8.x Store app under test.

Создание кода модульного теста Code the Unit Test

Кодирование модульного теста для приложения Магазина Windows To code the unit test for a Windows Store app

В редакторе кода добавьте модульный тест и включите необходимые утверждения и логику. In the Code Editor, edit the unit test and add the asserts and logic required for your test.

Дополнительные сведения см. в статье Использование классов утверждений в библиотеке MSDN. For more information, see in Using the Assert Classes in the MSDN library.

Выполнение модульных тестов Run Unit Tests

Сборка решения и выполнение модульного теста с помощью обозревателя тестов To build the solution and run the unit test using Test Explorer

В меню Тест выберите Windows, а затем Обозреватель тестов. On the Test menu, choose Windows, and then choose Test Explorer.

Отображается обозреватель тестов без вашего теста. Test Explorer displays without your test being listed.

В меню Построение выберите пункт Построить решение. From the Build menu, choose Build Solution.

Модульный тест теперь присутствует в списке. Your unit test is now listed.

Необходимо собрать решение, чтобы обновить список модульных тестов в обозревателе тестов. You must build the solution to update the list of unit tests in Test Explorer.

Известная проблема Visual Studio: необходимо открыть обозреватель тестов до создания тестового проекта. Visual Studio known issue: You must open Test Explorer prior to building the test project.

В обозревателе тестов выберите созданный модульный тест. In Test Explorer, choose the unit test you created.

Обозреватель тестов содержит ссылку на исходный код рядом с надписью Источник:. Test Explorer provides a link to the source code next to Source:.

Выберите Запустить все. Choose Run All.

Можно выбрать один или несколько модульных тестов, перечисленных в обозревателе, а затем щелкнуть правой кнопкой мыши и выбрать Запуск выбранных тестов. You can select one or more unit tests listed in Explorer and then right-click and choose Run Selected Tests.

Кроме того, можно выбрать Отладить выбранные тесты, Открыть тести использовать параметр Свойства . Additionally, you can choose to Debug Selected Tests, Open Test, and use the Properties option.

Выполняется модульный тест. The unit test runs. По завершении обозреватель тестов отображает состояние теста, затраченное время и содержит ссылку на источник. Upon completion, Test Explorer displays the test status, elapsed time and provides a link to the source.

Источник

Windows Store

Microsoft

Visual Studio Team Services extension for the Windows Store

This extension provides tasks to automate the release of your Windows apps to the Windows Store from your continuous integration environment in Visual Studio Team Services (VSTS). You no longer need to manually update your apps from Windows Dev Center.

Quick start

Ensure you meet the prerequisites.

Obtain and configure your Dev Center credentials.

Add tasks to your release definitions.

Prerequisites

You must have an Azure AD directory, and you must have global administrator permission for the directory. You can create a new Azure AD from Dev Center.

You must associate your Azure AD directory with your Dev Center account to obtain the credentials to allow this extension to access your account and perform actions on your behalf.

The app you want to publish must already exist: this extension can only publish updates to existing applications. You can create your app in Dev Center.

You must have already created at least one submission for your app before you can use the Publish task provided by this extension. If you have not created a submission, the task will fail.

More information and extra prerequisites specific to the API can be found here.

Obtaining your credentials

Your credentials are comprised of three parts: the Azure Tenant ID, the Client ID and the Client secret. Follow these steps to obtain them:

In Dev Center, go to your Account settings, click Manage users, and associate your organization’s Dev Center account with your organization’s Azure AD directory. For detailed instructions, see Manage account users.

In the Manage users page, click Add Azure AD applications, add the Azure AD application that represents the app or service that you will use to access submissions for your Dev Center account, and assign it the Manager role. If this application already exists in your Azure AD directory, you can select it on the Add Azure AD applications page to add it to your Dev Center account. Otherwise, you can create a new Azure AD application on the Add Azure AD applications page. For more information, see Add and manage Azure AD applications.

Return to the Manage users page, click the name of your Azure AD application to go to the application settings, and copy the Tenant ID and Client ID values.

Click Add new key. On the following screen, copy the Key value, which corresponds to the Client secret. You will not be able to access this info again after you leave this page, so make sure to not lose it. For more information, see the information about managing keys in Add and manage Azure AD applications.

See more details on how to create a new Azure AD application account in your organizaiton’s directory and add it to your Partner Center account here.

Configuring your credentials

Once you have obtained your credentials, you must configure them in VSTS so that the extension can access your Dev Center account and publish on your behalf. You must install the extension before being able to configure your credentials. Once the extension is installed, follow these steps:

In VSTS, select your project and go to the Project settings page. Click the Services tab. Expand the New Service endpoint dropdown, and select Windows Dev Center

In the pop-up box, fill in your credentials in the corresponding text boxes (Azure Tenant ID, Client ID and Client Secret). For the Connection Name, you can pick any name of your choosing. For the Server URL, use the default value «https://manage.devcenter.microsoft.com/».

  1. Click OK to confirm. Your endpoint is now configured and will be accessible by the extension’s tasks.

Using the extension

This extension provides release tasks. You can access them from your project by clicking the Release tab, and selecting an existing release definition or creating one. Select your chosen environment, then click Add tasks. The tasks contributed by this extension are in the Deploy section.

Task reference

Windows Store — Publish

This task allows you to publish your app on the Store by creating a submission on Dev Center. It has the following parameters:

Service endpoint — The endpoint containing the credentials you wish to use. Typically this will be the endpoint you created when configuring your credentials.

App identification method — How to identify the app to publish: by name or ID. If unsure, select «Primary name».

Application primary name / ID (Text, required) — The identification for the app. Depending on your selection, this should be either the app ID (visible in the URL of the app’s page on Dev Center) or the app primary name (visible on the app’s page on Dev Center).

Delete pending submissions (Checkbox) — If checked, will attempt to delete any in-progress submission before starting a new one. Note that only one submission at a time can be pending. Therefore, if this box is not checked and a submission is already pending, the task will fail. Furthermore, submissions created on the Dev Center UI cannot be deleted automatically by the task.

Metadata update method — How to update the app’s metadata. Options are No Update, Text Metadata or JSON-formatted Metadata. In the first case, the app’s metadata will not be changed from the previous submission. In the latter cases, the app’s metadata will be updated according to the expected format.

Metadata path (File path, required if visible) — Path to a directory containing the metadata to update (appears when selecting another option than No Update for the metadata update method). The expected format is detailed below.

Package path (File path, optional) — Path to your app’s main package (usually a file in .appx, .xap or .appxbundle format). Minimatch pattern is supported.

Additional package(s) (Text, optional) — A list of paths, one per line, of additional packages that your app needs, for example to support multiple platforms. Each individual path supports Minimatch pattern.

Skip polling (Checkbox) — If checked, will skip polling the submission after committing it to Dev Center. Otherwise, it will keep polling the submission till it gets published (which typically takes around 2 hours). Warning: If you check this box, you will not see errors, if any, that your submission may run into. You will have to manually check the status of your submission in Dev Center.

Delete Packages (Checkbox, optional) — If checked, will enable deletion of one or more old packages (sorted by version). Checking this box will enable a dropdown «Number of packages to keep» explained in following point. If not checked, will not delete any old package.

Number of Packages to keep (Picklist, required) — Specify number of latest packages (sorted by version) to be kept per unique target device family and target platform. For example, if you have a mix of 3 distinct packages each for Windows 10 desktop, mobile and Windows 8.1 X64 platform (so in total 9 packages), and you specify 2 in this box, then the oldest package in each group will be deleted (total packages after deletion will be 6).

You only have to select the packages you want to update. If you have a package that will not be updated as part of your release, you do not have to specify it.

Metadata format

The metadata format for the Publish task is as follows:

Examples are available below.

If the Metadata update method parameter is set to Text Metadata, text files are expected. If it is set to JSON-formatted Metadata, then JSON files are expected. All folder and file names are case-sensitive.

If text files are expected, then there should be one text file per metadata attribute that you wish to update, and it should have the same name as the attribute in question. For string attributes, the entire file contents will be used as-is. For array attributes (e.g. keywords, hardware capabilities), each non-empty line will be considered as an element of the array.

If JSON files are expected, then each JSON file must contain an object which has the attributes that you wish to update.

Metadata from the previous submission is always preserved if it is not present in the provided folder. For example, if you do not provide a «description.txt» file in your listing, the description will remain the same as it was in the last submission.

You can find the list of accepted attributes for the language code listings here. Note that the task will automatically set the images attribute for you based on the file structure you provide, so you should not specify it as it will be overridden.

You can find the list of accepted names for platform overrides here.

In the case of images, images from the previous submission are deleted, and must therefore be supplied again. Accepted attributes for the images can be found here. Note that the task will automatically set the fileName , fileStatus , id and imageType attributes for you, so you should not specify them as they will be overridden. The imageType attribute will correspond to the name of the folder in which your image is placed. The list of accepted image types can be found here.

The Store only supports images in png format. If you include images in any other format, they will be ignored.

Metadata structure example

Here are two examples of metadata structures, one for JSON attributes and one for text attributes.

Windows Store — Flight

This task allows you to publish your app to specified flight on the Store by creating a submission on Dev Center. It has the following parameters:

Service endpoint — The endpoint containing the credentials you wish to use. Typically this will be the endpoint you created when configuring your credentials.

App identification method — How to identify the app to publish: by name or ID. If unsure, select «Primary name».

Application primary name / ID (Text, required) — The identification for the app. Depending on your selection, this should be either the app ID (visible in the URL of the app’s page on Dev Center) or the app primary name (visible on the app’s page on Dev Center).

Delete pending submissions (Checkbox) — If checked, will attempt to delete any in-progress submission before starting a new one. Note that only one submission at a time can be pending. Therefore, if this box is not checked and a submission is already pending, the task will fail. Furthermore, submissions created on the Dev Center UI cannot be deleted automatically by the task.

Flight name (Text, required) — Friendly name of the flight group (as seen on the Dev Center) that you want to update the submission for.

Package path (File path, optional) — Path to your app’s main package (usually a file in .appx, .xap or .appxbundle format). Minimatch pattern is supported.

Additional package(s) (Text, optional) — A list of paths, one per line, of additional packages that your app needs, for example to support multiple platforms. Each individual path supports Minimatch pattern.

Skip polling (Checkbox) — If checked, will skip polling the submission after committing it to Dev Center. Otherwise, it will keep polling the submission till it gets published (which typically takes around 2 hours). Warning: If you check this box, you will not see errors, if any, that your submission may run into. You will have to manually check the status of your submission in Dev Center.

Delete Packages (Checkbox, optional) — If checked, will enable deletion of one or more old packages (sorted by version). Checking this box will enable a dropdown «Number of packages to keep» explained in following point. If not checked, will not delete any old package.

Number of Packages to keep (Picklist, required) — Specify number of latest packages (sorted by version) to be kept per unique target device family and target platform. For example, if you have a mix of 3 distinct packages each for Windows 10 desktop, mobile and Windows 8.1 X64 platform (so in total 9 packages), and you specify 2 in this box, then the oldest package in each group will be deleted (total packages after deletion will be 6).

You only have to select the packages you want to update. If you have a package that will not be updated as part of your release, you do not have to specify it. You have to specify at least one package.

Contact us

If you have questions, send us an email here.

Click here to report a bug or make a suggestion.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Windows store windows update
  • Windows store for business
  • Windows store apps uninstall
  • Windows store apps offline
  • Windows storage server 2008 r2 standard