Граф коммитов

25 Коммитов

Автор SHA1 Сообщение Дата
Sharath Manchala 9ddfc2505e
Increase the syntaxtoken size to 10 parameters (#13477)
* Increase the size to 8 parameters

* Introduce a unittest for codegen

* Change files

* Increase the params to 10

* Delete vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/CodeGen/Lkg/Microsoft.ReactNative.Managed.CodeGen.UnitTests.CodeGen.CodeGenMethodTests--EightParamReturnInt--Sync.lkg

* Delete vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/CodeGen/Lkg/Microsoft.ReactNative.Managed.CodeGen.UnitTests.CodeGen.CodeGenMethodTests--EightParamReturnInt--Async.lkg
2024-07-24 10:25:36 -07:00
Marlene Cota 75c8107169
Temporarily silence warning 4996 to unblock CI (#12401)
* Temporarily silence wanring 4996 to unblock CI

* Change files

* add description of disabled warning

* set SelfContained to true

* remove one SelfContained = true

* Disable newly added Button Fabric tests

* linting

* dummy test

* delete unused snapshots
2023-11-15 20:34:02 -08:00
Jon Thysell 9917e3b45f
Enable NuGet restore lock files for all projects (#12002)
## Description

This PR specifies that all projects should set the msbuild property `RestorePackagesWithLockFile` to `true` by default, not just the C# ones.

This way we can ensure that PR/CI will build reliably because every locked version should be available in the react-native-public ADO feed. Changes to NuGet dependencies in PRs should now explicilty fail if the new package version is not in the ADO feed, and therefore require us to manually approve the addition to the feed (as required by compliance).

Closes #11998

### Type of Change
- Bug fix (non-breaking change which fixes an issue)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)

### Why

This way we can ensure that PR/CI will build reliably because every locked version should be available in the react-native-public ADO feed. Changes to NuGet dependencies in PRs should now explicilty fail if the new package version is not in the ADO feed, and therefore require us to manually approve the addition to the feed (as required by compliance).

Closes #11998

### What
This PR specifies that all projects should set the msbuild property `RestorePackagesWithLockFile` to `true` by default, not just the C# ones.

## Screenshots
N/A

## Testing
N/A

## Changelog
Should this change be included in the release notes: no
2023-08-11 15:58:36 -07:00
Jon Thysell fe7d786b74
Fix typos and add `cspell` configuration (#11536)
## Description

This PR adds configuration files for `cspell`, which is available as a recommended VS Code plugin for this repo. This PR also fixes most "non-breaking" typos (comments, error messages, local names) for code files within the repo.

This PR **does not** add any kind of spell-checking enforcement on the repo.

### Type of Change
N/A

### Why

Clear up misunderstandings in comments / error messages.

### What
What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.

## Screenshots
N/A

## Testing
N/A
2023-05-05 13:12:29 -07:00
Jon Thysell 5885ee4477
Upgrade to VS 2022 (#9916)
*Description*

This PR updates RNW to build with (and require) Visual Studio 2022. This includes upgrading the `Microsoft.ReactNative.Managed.CodeGen` project to .NET 6.0

This PR does not change the minimum / target Windows SDK versions for RNW or RNW apps.

This PR does not change the language versions of C++ (17) and C# (8.0) used.

*Type of Change*
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- This change requires a documentation update

*Why*
Visual Studio 2022 is the currently supported version of Visual Studio and what is available to download without an MSDN subscription to access older versions. As Visual Studio 2019 support is reduced/deprecated, we need to migrate. 

Closes #8750
Closes #9499 
Closes #10130

*What*

What's changed:

* All VS project files have been updated to require a minimum of VS 2022 (aka version 17.0).
    * NuGet-based dependencies that are tied to VS version have been upgraded.
* The `Microsoft.ReactNative.Managed.CodeGen` project has been updated to .NET 6.0
    * The snapshots for the codegen tests have been updated to pass
* The E2E Test app has been updated to the latest version of `react-native-xaml` (needed to fix build issues)
    * Snapshots for E2E tests have been updated to pass

*Testing*

Builds and tests All tests
2022-10-31 11:00:09 -07:00
Vladimir Morozov 814ddb2398
Fix C# modules with multi-parameter callback methods (#10735)
* Fix C# modules with multi-parameter callback methods

* Change files

* Change sln file to have VS 2019 formatting

* Update vnext/Microsoft.ReactNative.Managed/ReactNotificationIdOf.cs

Co-authored-by: Danny van Velzen <dannyvv@microsoft.com>

* Address code review feedback

Co-authored-by: Vladimir Morozov <vmoroz@users.noreply.github.com>
Co-authored-by: Danny van Velzen <dannyvv@microsoft.com>
2022-10-26 04:23:09 +00:00
Vladimir Morozov c12abd2687
Fix C# Module Event invocation (#9154)
* Fix C# Module Event invocation

* Change files

* Renamed argument name  from `method` to `member`

* Update managed codegen tests LKG snapshots
2021-11-17 15:39:42 +00:00
Nick Gerleman 9440c876b2
Per-Slice NuGet artifacts in CI (#9019)
* Depends on #9017 to be merged first to avoid failures of the CI pipeline

We currently aggregate the various universal flavors into a UniversalBuild job, which must be completed before NuGet package based jobs. This means we may be waiting to start debug-flavor NuGet CLI tests until the longer release is also finished. It also adds a bit of extra latency.

This removes the step, and instead relies on only the flavors needed. In doing so we also move NuGet header layout to package creation time, instead of depending on a single job to also upload header artifacts. We no longer rely on MSBuild to patch react, so this can now be done without building.

This also partitions pipeline artifacts per-slice, to let NuGet init tests only download a single platform.

* remove changefile

* Change files

* PublishToolDuringBuild non-x64

* Add Microsoft.ReactNative.Managed.CodeGen.UnitTests

* MSBuild condition fix

* Typed slices with isolated artifacts

* yaml

* yaml

* convertToJson

* ARM casing in matrix names

* Update UniversalTest download path

* yaml

* Move PackDesktop to agent pool
2021-11-02 12:17:45 -07:00
Julio César Rocha 5bb8b1d591
Set ToolsVersion to "Current" (#8212)
* Set ToolsVersion to Current

* Change files

* Log MSBuild tools version and path in Vars target
2021-07-13 16:19:08 -07:00
dannyvv ab8ddeb29b
Fix 2 typos (#6559)
* Fix Typo in msbuild comment

* Change files
2020-11-18 14:03:40 +00:00
Andrew Coates 552c880eb4
Sync native module functions are wrapping the result in an array, which it shouldn't (#6253)
* Sync native module functions are wrapping the result in an array, which it shouldn't

* Change files

* Fix UTs and C# codegen
2020-10-19 12:53:20 -07:00
dannyvv b488372827
Update System.Private.Uri version for C# codegen (#6184)
* Update System.Private.Uri version for C# codegen

* Change files
2020-10-05 14:35:32 -07:00
dannyvv be3ac116ad
Update Nuget packages for Roslyn and some test projects (#6016)
* Update Nuget packages

* Change files
2020-09-17 19:58:58 -07:00
dannyvv 630240a4cb
Fix 5870: In C# CodeGen, don't check for inheritance, but do explicit type checks (#5874)
The fix for #5617 introduced a regression. The fix for that issue updated the code
to allow for all derived types of `IReactPromise<T>`. In this exapmle the C# compiler
found an assignability conversion between `IReadOnlyList<string>` and `IReactPromise<T>`.
Which resulted in invalid generated code that doesn't compile.
This fix was in hindsight also not the correct fix since the codegen (jsut like the
reflection based code) passes ReactPromise<T> instance. So the only two valid types
should be `IReactPromise<T>` or `ReactPromise<T>`. Which is what this fix puts in.

Fixes #5870

Co-authored-by: Jon Thysell (JAUNTY) <jthysell@microsoft.com>
2020-08-31 17:00:12 -07:00
dannyvv f9deb92222
Fix C# interop serialization for JsValueObject (#5826)
* Fix C# interop serialization for JsValueObject

* Change files
2020-08-25 08:24:34 -07:00
dannyvv 7a65915e82
Make C# CodeGen the default (#5630)
* Make C# CodeGen the default

* Switch to C# partial class

* Change files

* ReAdd codegen project ot the solution
2020-08-07 07:16:53 -07:00
dannyvv 9c1f3791b4
Update codegen targets for source mode to use property instead of items (#5599)
* Update codegen targets for source mode to use property instead of items

* Change files
2020-07-28 09:25:52 -07:00
dannyvv c99c018e48
Add support for `Task` and `Task<T>` async methods for C# native modules (#5523)
* Add support for `Task` and `Task<T>` async methods for C# native modules.

* Change files

* PR Feedback
2020-07-15 07:41:48 +00:00
dannyvv 9b4d7267c3
Create nuget package for Managed CodeGen (#5468)
* Create nuget package for Managed CodeGen

* Change files
2020-07-09 12:50:05 -07:00
dannyvv 5570885a65
Enable experimental usage of Microsoft.ReactNative.Managed as a nuget package (#5283)
* Enable experimental usage of Microsoft.ReactNative.Managed as a nuget package

* Change files

* Add fallback logic for different configurations
2020-07-07 03:16:24 +00:00
dannyvv a4ed167972
Fix casing typos in NuGet and MSBuild (#5358)
* Fix casing typos in NuGet and MSBuild

* Change files
2020-06-26 23:09:08 -07:00
Nick Gerleman ffa1ca29f7
Fix run-windows NuGet Errors in CI By Using Deterministic Binary and Update to netcore 3.1 from 2.2 (#5330)
* Try to Fix CI NuGet Errors

This change makes us use a deterministic NuGet binary that we always download. We remove the NuGetPath option which isn't exposed as a CLI option, and don't trust any local NuGet exe because we can't guarantee version. Instead of wrapping the entire logic in a recursive retry when downloading the binary, we isolate retries to just downloading the binary itself. We remove some of the blanket catches, command output parsing, and delegation to PowerShell instead of JS functions that were somehow leading to executing the whole command when trying to locate it?

Haven't tested locally. Will tell what CI thinks.

* Change files

* Rename changelog entry

* Close the write stream

* Https

* Make sure both streams finish sucessfully

* Update netcore version as azure devops images drop support

* Remove accidentally generated headers

Co-authored-by: Danny van Velzen 🁴 <dannyvv@microsoft.com>
2020-06-24 11:54:36 -07:00
dannyvv f69190f9c8
Remove Microsoft.ReactNative.SharedManaged project. (#5091)
* Remove SharedProject and add a breaking change notice

* Change files
2020-06-06 21:09:46 +00:00
dannyvv 564636d9d4
Fix SampleApp run-windows with deploy (#5123)
* Fix SampleApp run-windows with deploy

* Change files
2020-06-04 15:53:12 -07:00
dannyvv cadf33ee4f
Adding compile time Code generation for Managed React Native modules for Windows (#5064)
* Adding compile time Code generation for Managed React Native modules for Windows

* Changes

* Fix analysys typo

* Fix indentation & user path

* WriteFilesOnlyWhenDifferent

* Update AutoFixAssertionMessage
2020-06-04 02:39:30 +00:00