Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when trying to create a new project. #1996

Closed
2 of 11 tasks
asusralis opened this issue Oct 31, 2019 · 8 comments
Closed
2 of 11 tasks

Problem when trying to create a new project. #1996

asusralis opened this issue Oct 31, 2019 · 8 comments
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification

Comments

@asusralis
Copy link

asusralis commented Oct 31, 2019

Current behavior

Project has errors and missing XAML intellisense. When creating a new project a dialog appears that says, "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))." This also appears once the first time I click in the solution explorer.

The current problems: XAML intellisense is not working. When I right click on an xaml file and click "open with" it was set to Automatic Editor Selector (XML). I set the default to XAML Designer, deleted obj & bin files, restarted. Going to the code behind in an xaml file says:

Error	CS1061	'MainPage' does not contain a definition for 'InitializeComponent' and no accessible extension method 'InitializeComponent' accepting a first argument of type 'MainPage' could be found (are you missing a using directive or an assembly reference?)

Expected behavior

Project doesn't have errors and intellisense works.

How to reproduce it (as minimally and precisely as possible)

Start a new project.

Environment

Windows 10 1903. VS 2019.

Nuget Package:

Package Version(s):
Uno.Core - 1.28.0
Uno.UI - 1.45.0
Uno.UniverslaImageLoader - 1.9.32
Uno.Wasm.Bootstrap - 1.0.0-devv.244

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: 16.3.7)
  • for Mac (version: )

https://i.imgur.com/noNRSlt.png https://i.imgur.com/xIUZEu1.png

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

@asusralis asusralis added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Oct 31, 2019
@jeromelaban
Copy link
Member

Hi @asusralis, this is a known issue, please see #982, particularly this one.

Does the project otherwise build and run ?

@jeromelaban jeromelaban added the triage/needs-information Indicates an issue needs more information in order to work on it. label Oct 31, 2019
@asusralis
Copy link
Author

asusralis commented Oct 31, 2019

Hi, if I understand correctly that problem seems more specific than mine? I didn't have to do any of their steps for things to break.

The behavior outlined above was a project where I manually had to add a System.Xaml reference. In a brand new project the xaml has errors like, "The type 'Page' does not support direct content." The project builds at first but if you wait a little bit it realizes there are errors: https://i.imgur.com/kV2huIV.png

I added the reference and deleted the bin and obj files but the xaml still has errors in the new project... I'm not sure why they weren't fixed this time around.

@no-response no-response bot removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Oct 31, 2019
@asusralis
Copy link
Author

Is there no way to fix this right now?

@jeromelaban
Copy link
Member

@asusralis You should not need to add System.Xaml at any point (and if you do, it'll most probably break the build even more).

The problem I mentioned above is related to intellisense only, if you build any of the head projects, if should not cause any problem.

In the screenshot you posted, there's a drop-down that says "Intellisense + build", what happens if you select "build" only ?

@asusralis
Copy link
Author

asusralis commented Nov 4, 2019

No, it wasn't just XAML errors. Inside App.xaml.cs it said the ".WithFilter" method did not exist on factory. This did not let me build the application.

I created another project and besides that "Exception from HRESULT: 0x80070057" dialog appearing any time I click on something it seems build now (the dialog eventually stopped appearing). However, whenever I change something in XAML and build nothing changes - I have to manually rebuild the entire project for the changes to happen.

I still don't understand how the issue you sent me is related to my problem. Intellisense never worked for me - in the xaml editor or in the code behind - and changing the build action does nothing for me.

@jeromelaban
Copy link
Member

The WithFilter error is most probably related to the latest update of the Microsoft logging packages, with which the template is not yet compatible with. You can keep the original versions the template is providing (1.1.1).

The issue I provided is commonly related to the original error you reported, but you seem to be additional issues. The HRESULT error is unfortunately generic, so it's tough one to troubleshoot.

If you're still having issues building, even after rollbacking the Microsoft logger package updates let us know.

@asusralis
Copy link
Author

asusralis commented Nov 8, 2019

Hey! Thanks for the reply. I think I finally was able to consistency get the project to work. It takes a few minutes with changing settings like Open With back and forth, restarting visual studio, and like you said not updating those nuget packages, but afterwards it seems to not have any problems. Thanks for the help!

@jeromelaban
Copy link
Member

Thanks for trying! We're adjusting the documentation to mention those issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

No branches or pull requests

2 participants